Add pipeline tag and library name
#4
by
nielsr
HF staff
- opened
README.md
CHANGED
@@ -1,7 +1,4 @@
|
|
1 |
---
|
2 |
-
license: other
|
3 |
-
license_name: seallm
|
4 |
-
license_link: https://huggingface.co/SeaLLMs/SeaLLM-13B-Chat/blob/main/LICENSE
|
5 |
language:
|
6 |
- en
|
7 |
- zh
|
@@ -28,12 +25,16 @@ language:
|
|
28 |
- fa
|
29 |
- tl
|
30 |
- my
|
|
|
|
|
|
|
|
|
|
|
31 |
tags:
|
32 |
- multilingual
|
33 |
- babel
|
34 |
---
|
35 |
|
36 |
-
|
37 |
# *Babel*: Open Multilingual Large Language Models Serving Over 90% of Global Speakers
|
38 |
|
39 |
<p align="center">
|
@@ -108,8 +109,10 @@ messages = [
|
|
108 |
|
109 |
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
110 |
model_inputs = tokenizer([text], return_tensors="pt").to(device)
|
111 |
-
print(f"Formatted text
|
112 |
-
|
|
|
|
|
113 |
|
114 |
generated_ids = model.generate(model_inputs.input_ids, max_new_tokens=512, do_sample=True, eos_token_id=tokenizer.eos_token_id)
|
115 |
generated_ids = [
|
@@ -117,7 +120,8 @@ generated_ids = [
|
|
117 |
]
|
118 |
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
|
119 |
|
120 |
-
print(f"Response
|
|
|
121 |
```
|
122 |
|
123 |
### Performance of 10B-Size Instruct Models vs. Babel-9B-Chat
|
|
|
1 |
---
|
|
|
|
|
|
|
2 |
language:
|
3 |
- en
|
4 |
- zh
|
|
|
25 |
- fa
|
26 |
- tl
|
27 |
- my
|
28 |
+
license: other
|
29 |
+
license_name: seallm
|
30 |
+
license_link: https://huggingface.co/SeaLLMs/SeaLLM-13B-Chat/blob/main/LICENSE
|
31 |
+
library_name: transformers
|
32 |
+
pipeline_tag: text-generation
|
33 |
tags:
|
34 |
- multilingual
|
35 |
- babel
|
36 |
---
|
37 |
|
|
|
38 |
# *Babel*: Open Multilingual Large Language Models Serving Over 90% of Global Speakers
|
39 |
|
40 |
<p align="center">
|
|
|
109 |
|
110 |
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
111 |
model_inputs = tokenizer([text], return_tensors="pt").to(device)
|
112 |
+
print(f"Formatted text:
|
113 |
+
{text}")
|
114 |
+
print(f"Model input:
|
115 |
+
{model_inputs}")
|
116 |
|
117 |
generated_ids = model.generate(model_inputs.input_ids, max_new_tokens=512, do_sample=True, eos_token_id=tokenizer.eos_token_id)
|
118 |
generated_ids = [
|
|
|
120 |
]
|
121 |
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
|
122 |
|
123 |
+
print(f"Response:
|
124 |
+
{response[0]}")
|
125 |
```
|
126 |
|
127 |
### Performance of 10B-Size Instruct Models vs. Babel-9B-Chat
|