Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Using Unsloth to Load and Run Qwen25_Coder_MultipleChoice
|
| 2 |
|
| 3 |
Unsloth offers significant inference speed improvements for the Qwen25_Coder_MultipleChoice model. Here's how to properly load and use the model with Unsloth:
|
|
@@ -140,19 +153,20 @@ def get_answer(question, choices, model, tokenizer):
|
|
| 140 |
}
|
| 141 |
|
| 142 |
# Example usage
|
| 143 |
-
|
| 144 |
-
"question": "Which of the following correctly
|
| 145 |
"choices": [
|
| 146 |
-
"
|
| 147 |
-
"
|
| 148 |
-
"
|
| 149 |
-
"
|
| 150 |
-
]
|
|
|
|
| 151 |
}
|
| 152 |
|
| 153 |
result = get_answer(
|
| 154 |
-
|
| 155 |
-
|
| 156 |
model,
|
| 157 |
tokenizer
|
| 158 |
)
|
|
@@ -254,4 +268,4 @@ def batch_process_questions(questions_list, model, tokenizer, batch_size=4):
|
|
| 254 |
pip install flash-attn --no-build-isolation
|
| 255 |
```
|
| 256 |
|
| 257 |
-
With these optimizations, Qwen25_Coder_MultipleChoice should run significantly faster while maintaining the same high-quality multiple-choice reasoning and answers.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
datasets:
|
| 4 |
+
- tuandunghcmut/normal_dataset
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
metrics:
|
| 8 |
+
- accuracy
|
| 9 |
+
- perplexity
|
| 10 |
+
base_model:
|
| 11 |
+
- unsloth/Qwen2.5-Coder-1.5B-Instruct
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
+
---
|
| 14 |
# Using Unsloth to Load and Run Qwen25_Coder_MultipleChoice
|
| 15 |
|
| 16 |
Unsloth offers significant inference speed improvements for the Qwen25_Coder_MultipleChoice model. Here's how to properly load and use the model with Unsloth:
|
|
|
|
| 153 |
}
|
| 154 |
|
| 155 |
# Example usage
|
| 156 |
+
java_example = {
|
| 157 |
+
"question": "Which of the following correctly creates a new instance of a class in Java?",
|
| 158 |
"choices": [
|
| 159 |
+
"MyClass obj = new MyClass();",
|
| 160 |
+
"var obj = MyClass();",
|
| 161 |
+
"MyClass obj = MyClass.new();",
|
| 162 |
+
"obj = new(MyClass);"
|
| 163 |
+
],
|
| 164 |
+
"answer": "A" # Optional ground truth
|
| 165 |
}
|
| 166 |
|
| 167 |
result = get_answer(
|
| 168 |
+
java_example["question"],
|
| 169 |
+
java_example["choices"],
|
| 170 |
model,
|
| 171 |
tokenizer
|
| 172 |
)
|
|
|
|
| 268 |
pip install flash-attn --no-build-isolation
|
| 269 |
```
|
| 270 |
|
| 271 |
+
With these optimizations, Qwen25_Coder_MultipleChoice should run significantly faster while maintaining the same high-quality multiple-choice reasoning and answers.
|