cais/mmlu
Viewer • Updated • 231k • 550k • 883
How to use CarlOwOs/distilled-qwen3-0.6b-qlora-mmlu with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B-Base")
model = PeftModel.from_pretrained(base_model, "CarlOwOs/distilled-qwen3-0.6b-qlora-mmlu")This model was created through knowledge distillation from Qwen/Qwen3-8B-Base to Qwen/Qwen3-0.6B-Base using QLoRA (Quantized Low-Rank Adaptation).
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
# Load tokenizer and base model
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-0.6B-Base")
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B-Base")
# Load the distilled model
model = PeftModel.from_pretrained(base_model, "CarlOwOs/distilled-qwen3-0.6b-qlora-mmlu")
# For inference, merge and unload
model = model.merge_and_unload()
# Generate text
inputs = tokenizer("Question: What is the capital of France?\nA. London\nB. Berlin\nC. Paris\nD. Madrid\nAnswer:", return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model should be evaluated on MCQA tasks using log-likelihood comparison, as implemented in the evaluation framework.
Base model
Qwen/Qwen3-0.6B-Base