HyperX-Sen lbourdois commited on
Commit
d10a168
Β·
verified Β·
1 Parent(s): ee0e325

Improve language tag (#2)

Browse files

- Improve language tag (9f5514a0583b514a039678e95112859e06787ac5)


Co-authored-by: LoΓ―ck BOURDOIS <[email protected]>

Files changed (1) hide show
  1. README.md +93 -81
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
- - en
15
- base_model:
16
- - Qwen/Qwen2.5-7B-Instruct
17
- pipeline_tag: text-generation
18
- ---
19
-
20
- # **Qwen-2.5-7B-Reasoning (Fine-Tuned by HyperX-Sen)**
21
-
22
- ## πŸš€ **Model Overview**
23
- 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.
24
-
25
- ## πŸ”§ **Fine-Tuning Details**
26
- - **Base Model:** [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct)
27
- - **Fine-tuned by:** HyperX-Sen
28
- - **Dataset:** [GSM8K (Grade School Math 8K)](https://huggingface.co/datasets/openai/gsm8k)
29
- - **Hardware:** 2Γ— Tesla T4 GPUs
30
- - **Objective:** Improve complex reasoning and logical deduction
31
-
32
- ## πŸ“ˆ **Performance Improvements**
33
- Through fine-tuning on **GSM8K**, the model has improved in:
34
- - **Mathematical reasoning**
35
- - **Step-by-step logical deduction**
36
- - **Commonsense reasoning**
37
- - **Word problem-solving**
38
-
39
- This makes it ideal for applications requiring **high-level reasoning**, such as **AI tutoring, research assistance, and problem-solving AI agents**.
40
-
41
- ## πŸ›  **How to Use**
42
- ```python
43
- from transformers import AutoModelForCausalLM, AutoTokenizer
44
-
45
- # Load the model and tokenizer
46
- model_name = "HyperX-Sen/Qwen-2.5-7B-Reasoning"
47
- model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
48
- tokenizer = AutoTokenizer.from_pretrained(model_name)
49
-
50
- SYSTEM_PROMPT = """
51
- Respond in the following format:
52
- <reasoning>
53
- ...
54
- </reasoning>
55
- <answer>
56
- ...
57
- </answer>
58
- """
59
-
60
- # Define the conversation
61
- messages = [
62
- {"role": "system", "content": f"{SYSTEM_PROMPT}"},
63
- {"role": "user", "content": "What are the potential impacts of artificial intelligence on employment?"}
64
- ]
65
-
66
- # Format the chat input
67
- input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
68
-
69
- # Tokenize the formatted input
70
- inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
71
-
72
- # Generate the response
73
- output = model.generate(**inputs, max_length=512, do_sample=True, temperature=0.7)
74
-
75
- # Decode and display the response
76
- response = tokenizer.decode(output[0], skip_special_tokens=True)
77
- print(response)
78
- ```
79
-
80
- ## πŸ™Œ **Acknowledgments**
81
- A huge thanks to **Qwen** for providing the powerful **Qwen2.5-7B-Instruct** model, which served as the base for this fine-tuned version.
 
 
 
 
 
 
 
 
 
 
 
 
 
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.