Improve language tag
#2
by
lbourdois
- opened
README.md
CHANGED
|
@@ -1,114 +1,126 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: creativeml-openrail-m
|
| 3 |
-
datasets:
|
| 4 |
-
- amphora/QwQ-LongCoT-130K
|
| 5 |
-
language:
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
|
| 20 |
-
- Qwen
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
tokenizer
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
)
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
-
|
| 91 |
-
|
| 92 |
-
4.
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
-
|
| 100 |
-
-
|
| 101 |
-
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+

|
| 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 |
---
|