File size: 2,508 Bytes
9a397d6 49fc6d0 9a397d6 49fc6d0 b666e96 49fc6d0 9a397d6 49fc6d0 9a397d6 49fc6d0 9a397d6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
Hugging Face's logo
Hugging Face
Search models, datasets, users...
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
beyoru
/
MCQ-o1-1
like
0
Text Generation
Transformers
PyTorch
beyoru/Tin_hoc_mcq
English
Vietnamese
qwen2
text-generation-inference
trl
sft
conversational
Inference Endpoints
License:
apache-2.0
Model card
Files and versions
Community
Settings
MCQ-o1-1/
README.md
Metadata UI
license
datasets
+ Add Datasets
language
+ Add Languages
metrics
+ Add Metrics
base_model
+ Add Base Model
new_version
+ Add New Version
pipeline_tag
Auto-detected
library_name
+ Add Library
tags
+ Add Tags
Eval Results
View doc
1
2
3
4
5
6
7
8
9
10
11
12
13
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
⌄
⌄
⌄
⌄
⌄
⌄
⌄
⌄
⌄
---
base_model:
- Qwen/Qwen2.5-3B-Instruct
tags:
- text-generation-inference
- transformers
- qwen2
- trl
- sft
license: apache-2.0
language:
- en
- vi
datasets:
- beyoru/Tin_hoc_mcq
---
# Uploaded model
- **Developed by:** beyoru
- **License:** apache-2.0
# Usage
```
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "beyoru/MCQ-3B-o1-1"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
messages = [
{"role": "system", "content": "Tạo một câu hỏi trắc nghiệm về"},
{"role": "user", "content": "<YOUR CONTEXT>"}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
do_sample=True
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
```
# Notes:
- For small datasets with narrow content which the model has already done well on our domain, and doesn't want the model to forget the knowledge => Just need to focus on q,v.
- Fine-tuned lora with rank = 8 and alpha = 16, epoch = 1, linear (optim)
- DoRA
Commit directly to the
main
branch
Open as a pull request to the
main
branch
Commit changes
Update README.md
Add an extended description...
Upload images, audio, and videos by dragging in the text input, pasting, or clicking here.
|