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,81 +1,93 @@
|
|
1 |
-
---
|
2 |
-
library_name: transformers
|
3 |
-
tags:
|
4 |
-
- transformers
|
5 |
-
- text-generation-inference
|
6 |
-
- text-generation
|
7 |
-
- reasoning
|
8 |
-
- r1-reasoning
|
9 |
-
- fine-tuned
|
10 |
-
license: mit
|
11 |
-
datasets:
|
12 |
-
- openai/gsm8k
|
13 |
-
language:
|
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 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
tags:
|
4 |
+
- transformers
|
5 |
+
- text-generation-inference
|
6 |
+
- text-generation
|
7 |
+
- reasoning
|
8 |
+
- r1-reasoning
|
9 |
+
- fine-tuned
|
10 |
+
license: mit
|
11 |
+
datasets:
|
12 |
+
- openai/gsm8k
|
13 |
+
language:
|
14 |
+
- zho
|
15 |
+
- eng
|
16 |
+
- fra
|
17 |
+
- spa
|
18 |
+
- por
|
19 |
+
- deu
|
20 |
+
- ita
|
21 |
+
- rus
|
22 |
+
- jpn
|
23 |
+
- kor
|
24 |
+
- vie
|
25 |
+
- tha
|
26 |
+
- ara
|
27 |
+
base_model:
|
28 |
+
- Qwen/Qwen2.5-7B-Instruct
|
29 |
+
pipeline_tag: text-generation
|
30 |
+
---
|
31 |
+
|
32 |
+
# **Qwen-2.5-7B-Reasoning (Fine-Tuned by HyperX-Sen)**
|
33 |
+
|
34 |
+
## π **Model Overview**
|
35 |
+
This model is a fine-tuned version of **Qwen/Qwen2.5-7B-Instruct**, specifically optimized for **advanced reasoning tasks**. Fine-tuned on the **OpenAI GSM8K dataset**, it significantly enhances multi-step reasoning and problem-solving capabilities.
|
36 |
+
|
37 |
+
## π§ **Fine-Tuning Details**
|
38 |
+
- **Base Model:** [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
|
39 |
+
- **Fine-tuned by:** HyperX-Sen
|
40 |
+
- **Dataset:** [GSM8K (Grade School Math 8K)](https://huggingface.co/datasets/openai/gsm8k)
|
41 |
+
- **Hardware:** 2Γ Tesla T4 GPUs
|
42 |
+
- **Objective:** Improve complex reasoning and logical deduction
|
43 |
+
|
44 |
+
## π **Performance Improvements**
|
45 |
+
Through fine-tuning on **GSM8K**, the model has improved in:
|
46 |
+
- **Mathematical reasoning**
|
47 |
+
- **Step-by-step logical deduction**
|
48 |
+
- **Commonsense reasoning**
|
49 |
+
- **Word problem-solving**
|
50 |
+
|
51 |
+
This makes it ideal for applications requiring **high-level reasoning**, such as **AI tutoring, research assistance, and problem-solving AI agents**.
|
52 |
+
|
53 |
+
## π **How to Use**
|
54 |
+
```python
|
55 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
56 |
+
|
57 |
+
# Load the model and tokenizer
|
58 |
+
model_name = "HyperX-Sen/Qwen-2.5-7B-Reasoning"
|
59 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
|
60 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
61 |
+
|
62 |
+
SYSTEM_PROMPT = """
|
63 |
+
Respond in the following format:
|
64 |
+
<reasoning>
|
65 |
+
...
|
66 |
+
</reasoning>
|
67 |
+
<answer>
|
68 |
+
...
|
69 |
+
</answer>
|
70 |
+
"""
|
71 |
+
|
72 |
+
# Define the conversation
|
73 |
+
messages = [
|
74 |
+
{"role": "system", "content": f"{SYSTEM_PROMPT}"},
|
75 |
+
{"role": "user", "content": "What are the potential impacts of artificial intelligence on employment?"}
|
76 |
+
]
|
77 |
+
|
78 |
+
# Format the chat input
|
79 |
+
input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
80 |
+
|
81 |
+
# Tokenize the formatted input
|
82 |
+
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
|
83 |
+
|
84 |
+
# Generate the response
|
85 |
+
output = model.generate(**inputs, max_length=512, do_sample=True, temperature=0.7)
|
86 |
+
|
87 |
+
# Decode and display the response
|
88 |
+
response = tokenizer.decode(output[0], skip_special_tokens=True)
|
89 |
+
print(response)
|
90 |
+
```
|
91 |
+
|
92 |
+
## π **Acknowledgments**
|
93 |
+
A huge thanks to **Qwen** for providing the powerful **Qwen2.5-7B-Instruct** model, which served as the base for this fine-tuned version.
|