Improve language tag

#2
by lbourdois - opened
Files changed (1) hide show
  1. README.md +125 -113
README.md CHANGED
@@ -1,114 +1,126 @@
1
- ---
2
- license: creativeml-openrail-m
3
- datasets:
4
- - amphora/QwQ-LongCoT-130K
5
- language:
6
- - en
7
- base_model:
8
- - Qwen/Qwen2.5-7B-Instruct
9
- pipeline_tag: text-generation
10
- library_name: transformers
11
- tags:
12
- - Long-CoT
13
- - Qwen2.5
14
- - 7B
15
- - safetensors
16
- - text-generation-inference
17
- - QwQ
18
- - SFT
19
- - Math
20
- - Qwen with Questions
21
- new_version: prithivMLmods/QwQ-LCoT2-7B-Instruct
22
- ---
23
-
24
- # **QwQ-LCoT-7B-Instruct Model File**
25
-
26
- The QwQ-LCoT-7B-Instruct is a fine-tuned language model designed for advanced reasoning and instruction-following tasks. It leverages the Qwen2.5-7B base model and has been fine-tuned on the amphora/QwQ-LongCoT-130K dataset, focusing on chain-of-thought (CoT) reasoning. This model is optimized for tasks requiring logical reasoning, detailed explanations, and multi-step problem-solving, making it ideal for applications such as instruction-following, text generation, and complex reasoning tasks.
27
-
28
- ## Quickstart with Transformers
29
-
30
- Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
31
-
32
- ```python
33
- from transformers import AutoModelForCausalLM, AutoTokenizer
34
-
35
- model_name = "prithivMLmods/QwQ-LCoT-7B-Instruct"
36
-
37
- model = AutoModelForCausalLM.from_pretrained(
38
- model_name,
39
- torch_dtype="auto",
40
- device_map="auto"
41
- )
42
- tokenizer = AutoTokenizer.from_pretrained(model_name)
43
-
44
- prompt = "How many r in strawberry."
45
- messages = [
46
- {"role": "system", "content": "You are a helpful and harmless assistant. You are Qwen developed by Alibaba. You should think step-by-step."},
47
- {"role": "user", "content": prompt}
48
- ]
49
- text = tokenizer.apply_chat_template(
50
- messages,
51
- tokenize=False,
52
- add_generation_prompt=True
53
- )
54
- model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
55
-
56
- generated_ids = model.generate(
57
- **model_inputs,
58
- max_new_tokens=512
59
- )
60
- generated_ids = [
61
- output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
62
- ]
63
-
64
- response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
65
- ```
66
-
67
- ### **Sample Long CoT:**
68
-
69
- ![Screenshot 2024-12-13 211732.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/Mgm9LmQZlFZmglKYwEDYA.png)
70
-
71
- ---
72
- ### **Key Features:**
73
-
74
- 1. **Model Size:**
75
- - **7.62B parameters** (FP16 precision).
76
-
77
- 2. **Model Sharding:**
78
- - The model weights are split into 4 shards (`safetensors`) for efficient storage and download:
79
- - `model-00001-of-00004.safetensors` (4.88 GB)
80
- - `model-00002-of-00004.safetensors` (4.93 GB)
81
- - `model-00003-of-00004.safetensors` (4.33 GB)
82
- - `model-00004-of-00004.safetensors` (1.09 GB)
83
-
84
- 3. **Tokenizer:**
85
- - Byte-pair encoding (BPE) based.
86
- - Files included:
87
- - `vocab.json` (2.78 MB)
88
- - `merges.txt` (1.82 MB)
89
- - `tokenizer.json` (11.4 MB)
90
- - Special tokens mapped in `special_tokens_map.json` (e.g., `<pad>`, `<eos>`).
91
-
92
- 4. **Configuration Files:**
93
- - `config.json`: Defines model architecture and hyperparameters.
94
- - `generation_config.json`: Settings for inference and text generation tasks.
95
-
96
- ---
97
-
98
- ### **Training Dataset:**
99
- - **Dataset Name:** [amphora/QwQ-LongCoT-130K](https://huggingface.co/datasets/amphora/QwQ-LongCoT-130K)
100
- - **Size:** 133k examples.
101
- - **Focus:** Chain-of-Thought reasoning for complex tasks.
102
-
103
- ---
104
-
105
- ### **Use Cases:**
106
- 1. **Instruction Following:**
107
- Handle user instructions effectively, even for multi-step tasks.
108
-
109
- 2. **Reasoning Tasks:**
110
- Perform logical reasoning and generate detailed step-by-step solutions.
111
-
112
- 3. **Text Generation:**
113
- Generate coherent, context-aware responses.
 
 
 
 
 
 
 
 
 
 
 
 
114
  ---
 
1
+ ---
2
+ license: creativeml-openrail-m
3
+ datasets:
4
+ - amphora/QwQ-LongCoT-130K
5
+ language:
6
+ - zho
7
+ - eng
8
+ - fra
9
+ - spa
10
+ - por
11
+ - deu
12
+ - ita
13
+ - rus
14
+ - jpn
15
+ - kor
16
+ - vie
17
+ - tha
18
+ - ara
19
+ base_model:
20
+ - Qwen/Qwen2.5-7B-Instruct
21
+ pipeline_tag: text-generation
22
+ library_name: transformers
23
+ tags:
24
+ - Long-CoT
25
+ - Qwen2.5
26
+ - 7B
27
+ - safetensors
28
+ - text-generation-inference
29
+ - QwQ
30
+ - SFT
31
+ - Math
32
+ - Qwen with Questions
33
+ new_version: prithivMLmods/QwQ-LCoT2-7B-Instruct
34
+ ---
35
+
36
+ # **QwQ-LCoT-7B-Instruct Model File**
37
+
38
+ The QwQ-LCoT-7B-Instruct is a fine-tuned language model designed for advanced reasoning and instruction-following tasks. It leverages the Qwen2.5-7B base model and has been fine-tuned on the amphora/QwQ-LongCoT-130K dataset, focusing on chain-of-thought (CoT) reasoning. This model is optimized for tasks requiring logical reasoning, detailed explanations, and multi-step problem-solving, making it ideal for applications such as instruction-following, text generation, and complex reasoning tasks.
39
+
40
+ ## Quickstart with Transformers
41
+
42
+ Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
43
+
44
+ ```python
45
+ from transformers import AutoModelForCausalLM, AutoTokenizer
46
+
47
+ model_name = "prithivMLmods/QwQ-LCoT-7B-Instruct"
48
+
49
+ model = AutoModelForCausalLM.from_pretrained(
50
+ model_name,
51
+ torch_dtype="auto",
52
+ device_map="auto"
53
+ )
54
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
55
+
56
+ prompt = "How many r in strawberry."
57
+ messages = [
58
+ {"role": "system", "content": "You are a helpful and harmless assistant. You are Qwen developed by Alibaba. You should think step-by-step."},
59
+ {"role": "user", "content": prompt}
60
+ ]
61
+ text = tokenizer.apply_chat_template(
62
+ messages,
63
+ tokenize=False,
64
+ add_generation_prompt=True
65
+ )
66
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
67
+
68
+ generated_ids = model.generate(
69
+ **model_inputs,
70
+ max_new_tokens=512
71
+ )
72
+ generated_ids = [
73
+ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
74
+ ]
75
+
76
+ response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
77
+ ```
78
+
79
+ ### **Sample Long CoT:**
80
+
81
+ ![Screenshot 2024-12-13 211732.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/Mgm9LmQZlFZmglKYwEDYA.png)
82
+
83
+ ---
84
+ ### **Key Features:**
85
+
86
+ 1. **Model Size:**
87
+ - **7.62B parameters** (FP16 precision).
88
+
89
+ 2. **Model Sharding:**
90
+ - The model weights are split into 4 shards (`safetensors`) for efficient storage and download:
91
+ - `model-00001-of-00004.safetensors` (4.88 GB)
92
+ - `model-00002-of-00004.safetensors` (4.93 GB)
93
+ - `model-00003-of-00004.safetensors` (4.33 GB)
94
+ - `model-00004-of-00004.safetensors` (1.09 GB)
95
+
96
+ 3. **Tokenizer:**
97
+ - Byte-pair encoding (BPE) based.
98
+ - Files included:
99
+ - `vocab.json` (2.78 MB)
100
+ - `merges.txt` (1.82 MB)
101
+ - `tokenizer.json` (11.4 MB)
102
+ - Special tokens mapped in `special_tokens_map.json` (e.g., `<pad>`, `<eos>`).
103
+
104
+ 4. **Configuration Files:**
105
+ - `config.json`: Defines model architecture and hyperparameters.
106
+ - `generation_config.json`: Settings for inference and text generation tasks.
107
+
108
+ ---
109
+
110
+ ### **Training Dataset:**
111
+ - **Dataset Name:** [amphora/QwQ-LongCoT-130K](https://huggingface.co/datasets/amphora/QwQ-LongCoT-130K)
112
+ - **Size:** 133k examples.
113
+ - **Focus:** Chain-of-Thought reasoning for complex tasks.
114
+
115
+ ---
116
+
117
+ ### **Use Cases:**
118
+ 1. **Instruction Following:**
119
+ Handle user instructions effectively, even for multi-step tasks.
120
+
121
+ 2. **Reasoning Tasks:**
122
+ Perform logical reasoning and generate detailed step-by-step solutions.
123
+
124
+ 3. **Text Generation:**
125
+ Generate coherent, context-aware responses.
126
  ---