lbourdois commited on
Commit
1324bd4
·
verified ·
1 Parent(s): 4f3efc7

Improve language tag

Browse files

Hi! 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.

Files changed (1) hide show
  1. README.md +67 -57
README.md CHANGED
@@ -1,58 +1,68 @@
1
- ---
2
- license: mit
3
- pipeline_tag: text-generation
4
- language:
5
- - en
6
- - ru
7
- - code
8
- base_model:
9
- - Qwen/Qwen2.5-7B-Instruct
10
- tags:
11
- - qwen2.5
12
- ---
13
-
14
- ### theqwenmoe
15
- - 18.3B parametrs
16
- - English & Russian
17
- - Math & Logic
18
- - Code: Python, Javascript, Java, PHP, C++, C#, ...
19
-
20
- This is experimental model. Can be bugs and various problems.
21
-
22
- Made with mergekit and unsloth apps by ehristoforu.
23
-
24
- Code usage example:
25
- ```py
26
- from transformers import AutoModelForCausalLM, AutoTokenizer
27
-
28
- model_name = "ehristoforu/theqwenmoe"
29
-
30
- model = AutoModelForCausalLM.from_pretrained(
31
- model_name,
32
- torch_dtype="auto",
33
- device_map="auto"
34
- )
35
- tokenizer = AutoTokenizer.from_pretrained(model_name)
36
-
37
- prompt = "Give me a short introduction to large language model."
38
- messages = [
39
- {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
40
- {"role": "user", "content": prompt}
41
- ]
42
- text = tokenizer.apply_chat_template(
43
- messages,
44
- tokenize=False,
45
- add_generation_prompt=True
46
- )
47
- model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
48
-
49
- generated_ids = model.generate(
50
- **model_inputs,
51
- max_new_tokens=512
52
- )
53
- generated_ids = [
54
- output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
55
- ]
56
-
57
- response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
 
 
 
 
 
 
 
 
 
 
58
  ```
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: text-generation
4
+ language:
5
+ - zho
6
+ - eng
7
+ - fra
8
+ - spa
9
+ - por
10
+ - deu
11
+ - ita
12
+ - rus
13
+ - jpn
14
+ - kor
15
+ - vie
16
+ - tha
17
+ - ara
18
+ base_model:
19
+ - Qwen/Qwen2.5-7B-Instruct
20
+ tags:
21
+ - qwen2.5
22
+ ---
23
+
24
+ ### theqwenmoe
25
+ - 18.3B parametrs
26
+ - English & Russian
27
+ - Math & Logic
28
+ - Code: Python, Javascript, Java, PHP, C++, C#, ...
29
+
30
+ This is experimental model. Can be bugs and various problems.
31
+
32
+ Made with mergekit and unsloth apps by ehristoforu.
33
+
34
+ Code usage example:
35
+ ```py
36
+ from transformers import AutoModelForCausalLM, AutoTokenizer
37
+
38
+ model_name = "ehristoforu/theqwenmoe"
39
+
40
+ model = AutoModelForCausalLM.from_pretrained(
41
+ model_name,
42
+ torch_dtype="auto",
43
+ device_map="auto"
44
+ )
45
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
46
+
47
+ prompt = "Give me a short introduction to large language model."
48
+ messages = [
49
+ {"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
50
+ {"role": "user", "content": prompt}
51
+ ]
52
+ text = tokenizer.apply_chat_template(
53
+ messages,
54
+ tokenize=False,
55
+ add_generation_prompt=True
56
+ )
57
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
58
+
59
+ generated_ids = model.generate(
60
+ **model_inputs,
61
+ max_new_tokens=512
62
+ )
63
+ generated_ids = [
64
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
65
+ ]
66
+
67
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
68
  ```