explorewithai
commited on
Commit
•
aa1ab0a
1
Parent(s):
bbf47c2
Update README.md
Browse files
README.md
CHANGED
@@ -34,4 +34,23 @@ ChatFrame-Persian excels in several key performance metrics, including accuracy,
|
|
34 |
While ChatFrame-Persian has been trained to minimize biases, it is important to recognize that all language models have limitations. Users should be aware of potential biases related to the training data and the possibility of generating inappropriate or offensive responses. Additionally, the model may struggle with highly specialized or technical language.
|
35 |
|
36 |
## Responsible AI Considerations
|
37 |
-
ChatFrame-Persian has been developed with a focus on responsible AI practices. The model has been trained to respect user privacy and adhere to ethical guidelines. It is important for users to monitor the model's output and provide feedback to continuously improve its performance and address any potential issues.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
While ChatFrame-Persian has been trained to minimize biases, it is important to recognize that all language models have limitations. Users should be aware of potential biases related to the training data and the possibility of generating inappropriate or offensive responses. Additionally, the model may struggle with highly specialized or technical language.
|
35 |
|
36 |
## Responsible AI Considerations
|
37 |
+
ChatFrame-Persian has been developed with a focus on responsible AI practices. The model has been trained to respect user privacy and adhere to ethical guidelines. It is important for users to monitor the model's output and provide feedback to continuously improve its performance and address any potential issues.
|
38 |
+
|
39 |
+
## Using pipeline to run model(A100 GPU tested):
|
40 |
+
```python
|
41 |
+
from transformers import pipeline
|
42 |
+
import torch
|
43 |
+
|
44 |
+
device = 0 if torch.cuda.is_available() else -1
|
45 |
+
|
46 |
+
def generate_response(user_input):
|
47 |
+
pipe = pipeline("text-generation", model="frameai/ChatFrame-Instruct-Persian-Small", device = device)
|
48 |
+
messages = [
|
49 |
+
{"role": "user", "content": user_input},
|
50 |
+
]
|
51 |
+
response = pipe(messages, max_length=512)
|
52 |
+
return response[0]['generated_text'][1]["content"]
|
53 |
+
|
54 |
+
ai = generate_response(user_input = "ایران رو برام توصیف کن")
|
55 |
+
print(ai)
|
56 |
+
```
|