Downloads · 30 days
0
kunhsiang/RC-Competition-DeepSeek-R1-Distill-Llama-70B-bnb-4bit-SFTOnly-ChatML-CoT-v2-20251211_0619
RC-Competition-DeepSeek-R1-Distill-Llama-70B-bnb-4bit-SFTOnly-ChatML-CoT-v2-20251211_0619 is a machine learning model from kunhsiang. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
此模型採用 ChatML 格式 進行訓練,並使用 DataCollatorForCompletionOnlyLM 實現精準的 Loss Masking。
Downloads · 30 days
0
Access
Public
Updated Dec 11, 2025
Repo size
160 GB
Likes
1
Public
Click a slice to open those files.
.safetensors26.5 GB · 80%
From the Hugging Face model README
此模型採用 ChatML 格式 進行訓練,並使用 DataCollatorForCompletionOnlyLM 實現精準的 Loss Masking。
<|im_start|>user
[文章內容] ← ❌ 不計算 loss
<|im_end|>
<|im_start|>assistant
<think>
[推理過程] ← ✅ 計算 loss
</think>
答案: X ← ✅ 計算 loss
<|im_end|>
| 參數 | 值 |
|---|---|
| Base Model | unsloth/DeepSeek-R1-Distill-Llama-70B-bnb-4bit |
| LoRA Rank | 256 |
| LoRA Alpha | 256 |
| Learning Rate | 2e-05 |
| Effective Batch Size | 32 |
| Epochs | 1 |
| Max Sequence Length | 4096 |
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
"kunhsiang/RC-Competition-DeepSeek-R1-Distill-Llama-70B-bnb-4bit-SFTOnly-ChatML-CoT-v2-20251211_0619",
max_seq_length=4096,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)
messages = [{"role": "user", "content": "[文章內容]\n問題: ...\n選項: 1. ... 2. ... 3. ... 4. ..."}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
outputs = model.generate(inputs, max_new_tokens=1024, temperature=0.7, top_p=0.9)
print(tokenizer.decode(outputs[0], skip_special_tokens=False))