Improve language tag

#1
by lbourdois - opened
Files changed (1) hide show
  1. README.md +108 -96
README.md CHANGED
@@ -1,96 +1,108 @@
1
- ---
2
- license: mit
3
- datasets:
4
- - tuanha1305/DeepSeek-R1-Distill
5
- language:
6
- - en
7
- base_model:
8
- - Qwen/Qwen2.5-1.5B-Instruct
9
- ---
10
-
11
- # Qwen2.5-1.5B-Instruct-Lora-Deepseek-R1
12
-
13
- This model is a LoRA (Low-Rank Adaptation) fine-tuned version of **Qwen2.5-1.5B-Instruct**, specifically fine-tuned on the **DeepSeek-R1-Distill** dataset. LoRA was applied to the query (`q`), key (`k`), and value (`v`) projection matrices.
14
-
15
- **Base Model:** [Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
16
- **Dataset:** [tuanha1305/DeepSeek-R1-Distill](https://huggingface.co/datasets/tuanha1305/DeepSeek-R1-Distill)
17
-
18
- ---
19
-
20
- ## Training Details
21
-
22
- - **Hardware:** 1 × NVIDIA A100 GPU (80GB HBM)
23
- - **Training Time:** ~7 hours and 17 minutes
24
- - **Total Steps:** 9000
25
- - **Fine-tuning Method:** LoRA (q, k, v)
26
-
27
- ---
28
-
29
- ## Evaluation on MATH-500 Benchmark
30
-
31
- After following the sampling-based Pass@1 methodology inspired by [DeepSeek R1](https://arxiv.org/abs/2501.12948), we have
32
-
33
-
34
- | Parameter | Value |
35
- |------------------|---------|
36
- | **dataset** | `HuggingFaceH4/MATH-500` |
37
- | **temperature** | `0.6` |
38
- | **top_p** | `0.95` |
39
- | **max_new_tokens** | `2048` |
40
- | **Num_samples** | `16` per question |
41
-
42
-
43
- **Pass@1:** **54.60%** (273 out of 500 questions)
44
-
45
- *This metric represents the percentage of questions with at least one correct solution among multiple generated attempts.*
46
-
47
- ---
48
-
49
- ## How to Use
50
-
51
- Example Python Script
52
-
53
- ```python
54
- import torch
55
- from transformers import AutoModelForCausalLM, AutoTokenizer
56
-
57
- model_name = "PursuitOfDataScience/Qwen2.5-1.5B-Instruct-Lora-Deepseek-R1"
58
-
59
- tokenizer = AutoTokenizer.from_pretrained(model_name)
60
- model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
61
-
62
- test_prompt = "Instruction: Explain how machine learning works\nResponse:"
63
- inputs = tokenizer(test_prompt, return_tensors="pt").to(model.device)
64
-
65
- with torch.no_grad():
66
- outputs = model.generate(
67
- inputs.input_ids,
68
- max_length=200,
69
- temperature=0.7,
70
- top_p=0.95,
71
- do_sample=True
72
- )
73
-
74
- generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
75
- print(f"\nGenerated response:\n{generated_text}")
76
-
77
- ```
78
-
79
- ### Sample Output
80
-
81
- ```
82
- Instruction: Explain how machine learning works
83
- Response: Machine learning is a subset of artificial intelligence that allows computers to learn from data without being explicitly programmed. It involves using algorithms and statistical models to analyze patterns, trends, or relationships in large sets of data and then making predictions or decisions based on these insights.
84
-
85
- Here's an overview of the key steps involved in implementing a machine learning model:
86
-
87
- 1. Data collection: Gather historical data relevant to your problem domain.
88
- 2. Data preprocessing: Cleanse, normalize, and transform raw data into a format suitable for analysis.
89
- 3. Feature selection: Identify important features (variables) that can help predict outcomes.
90
- 4. Model training: Train various machine learning algorithms on subsets of labeled data.
91
- 5. Model evaluation: Assess performance metrics like accuracy, precision, recall, etc., using test datasets.
92
- 6. Model tuning: Optimize hyperparameters and tweak algorithm settings to improve predictive power.
93
- 7. Deployment: Implement trained models in production systems for real-time predictions.
94
-
95
- ```
96
-
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - tuanha1305/DeepSeek-R1-Distill
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-1.5B-Instruct
21
+ ---
22
+
23
+ # Qwen2.5-1.5B-Instruct-Lora-Deepseek-R1
24
+
25
+ This model is a LoRA (Low-Rank Adaptation) fine-tuned version of **Qwen2.5-1.5B-Instruct**, specifically fine-tuned on the **DeepSeek-R1-Distill** dataset. LoRA was applied to the query (`q`), key (`k`), and value (`v`) projection matrices.
26
+
27
+ **Base Model:** [Qwen2.5-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct)
28
+ **Dataset:** [tuanha1305/DeepSeek-R1-Distill](https://huggingface.co/datasets/tuanha1305/DeepSeek-R1-Distill)
29
+
30
+ ---
31
+
32
+ ## Training Details
33
+
34
+ - **Hardware:** 1 × NVIDIA A100 GPU (80GB HBM)
35
+ - **Training Time:** ~7 hours and 17 minutes
36
+ - **Total Steps:** 9000
37
+ - **Fine-tuning Method:** LoRA (q, k, v)
38
+
39
+ ---
40
+
41
+ ## Evaluation on MATH-500 Benchmark
42
+
43
+ After following the sampling-based Pass@1 methodology inspired by [DeepSeek R1](https://arxiv.org/abs/2501.12948), we have
44
+
45
+
46
+ | Parameter | Value |
47
+ |------------------|---------|
48
+ | **dataset** | `HuggingFaceH4/MATH-500` |
49
+ | **temperature** | `0.6` |
50
+ | **top_p** | `0.95` |
51
+ | **max_new_tokens** | `2048` |
52
+ | **Num_samples** | `16` per question |
53
+
54
+
55
+ **Pass@1:** **54.60%** (273 out of 500 questions)
56
+
57
+ *This metric represents the percentage of questions with at least one correct solution among multiple generated attempts.*
58
+
59
+ ---
60
+
61
+ ## How to Use
62
+
63
+ Example Python Script
64
+
65
+ ```python
66
+ import torch
67
+ from transformers import AutoModelForCausalLM, AutoTokenizer
68
+
69
+ model_name = "PursuitOfDataScience/Qwen2.5-1.5B-Instruct-Lora-Deepseek-R1"
70
+
71
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
72
+ model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
73
+
74
+ test_prompt = "Instruction: Explain how machine learning works\nResponse:"
75
+ inputs = tokenizer(test_prompt, return_tensors="pt").to(model.device)
76
+
77
+ with torch.no_grad():
78
+ outputs = model.generate(
79
+ inputs.input_ids,
80
+ max_length=200,
81
+ temperature=0.7,
82
+ top_p=0.95,
83
+ do_sample=True
84
+ )
85
+
86
+ generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
87
+ print(f"\nGenerated response:\n{generated_text}")
88
+
89
+ ```
90
+
91
+ ### Sample Output
92
+
93
+ ```
94
+ Instruction: Explain how machine learning works
95
+ Response: Machine learning is a subset of artificial intelligence that allows computers to learn from data without being explicitly programmed. It involves using algorithms and statistical models to analyze patterns, trends, or relationships in large sets of data and then making predictions or decisions based on these insights.
96
+
97
+ Here's an overview of the key steps involved in implementing a machine learning model:
98
+
99
+ 1. Data collection: Gather historical data relevant to your problem domain.
100
+ 2. Data preprocessing: Cleanse, normalize, and transform raw data into a format suitable for analysis.
101
+ 3. Feature selection: Identify important features (variables) that can help predict outcomes.
102
+ 4. Model training: Train various machine learning algorithms on subsets of labeled data.
103
+ 5. Model evaluation: Assess performance metrics like accuracy, precision, recall, etc., using test datasets.
104
+ 6. Model tuning: Optimize hyperparameters and tweak algorithm settings to improve predictive power.
105
+ 7. Deployment: Implement trained models in production systems for real-time predictions.
106
+
107
+ ```
108
+