Improve language tag
Browse filesHi! As the model is multilingual, this is a PR to add other languages than English to the language tag to improve the referencing. Note that 29 languages are announced in the README, but only 13 are explicitly listed. I was therefore only able to add these 13 languages.
README.md
CHANGED
|
@@ -1,46 +1,60 @@
|
|
| 1 |
-
---
|
| 2 |
-
tags:
|
| 3 |
-
- autotrain
|
| 4 |
-
- text-generation-inference
|
| 5 |
-
- text-generation
|
| 6 |
-
- peft
|
| 7 |
-
library_name: transformers
|
| 8 |
-
base_model: Qwen/Qwen2.5-3B
|
| 9 |
-
widget:
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
license: other
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- autotrain
|
| 4 |
+
- text-generation-inference
|
| 5 |
+
- text-generation
|
| 6 |
+
- peft
|
| 7 |
+
library_name: transformers
|
| 8 |
+
base_model: Qwen/Qwen2.5-3B
|
| 9 |
+
widget:
|
| 10 |
+
- messages:
|
| 11 |
+
- role: user
|
| 12 |
+
content: What is your favorite condiment?
|
| 13 |
+
license: other
|
| 14 |
+
language:
|
| 15 |
+
- zho
|
| 16 |
+
- eng
|
| 17 |
+
- fra
|
| 18 |
+
- spa
|
| 19 |
+
- por
|
| 20 |
+
- deu
|
| 21 |
+
- ita
|
| 22 |
+
- rus
|
| 23 |
+
- jpn
|
| 24 |
+
- kor
|
| 25 |
+
- vie
|
| 26 |
+
- tha
|
| 27 |
+
- ara
|
| 28 |
+
---
|
| 29 |
+
|
| 30 |
+
# Model Trained Using AutoTrain
|
| 31 |
+
|
| 32 |
+
This model was trained using AutoTrain. For more information, please visit [AutoTrain](https://hf.co/docs/autotrain).
|
| 33 |
+
|
| 34 |
+
# Usage
|
| 35 |
+
|
| 36 |
+
```python
|
| 37 |
+
|
| 38 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 39 |
+
|
| 40 |
+
model_path = "PATH_TO_THIS_REPO"
|
| 41 |
+
|
| 42 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 43 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 44 |
+
model_path,
|
| 45 |
+
device_map="auto",
|
| 46 |
+
torch_dtype='auto'
|
| 47 |
+
).eval()
|
| 48 |
+
|
| 49 |
+
# Prompt content: "hi"
|
| 50 |
+
messages = [
|
| 51 |
+
{"role": "user", "content": "hi"}
|
| 52 |
+
]
|
| 53 |
+
|
| 54 |
+
input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
|
| 55 |
+
output_ids = model.generate(input_ids.to('cuda'))
|
| 56 |
+
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
|
| 57 |
+
|
| 58 |
+
# Model response: "Hello! How can I assist you today?"
|
| 59 |
+
print(response)
|
| 60 |
```
|