Downloads · 30 days
0
Amir337/llm-course-hw3-tinyllamma-qlora
llm-course-hw3-tinyllamma-qlora is a machine learning model from Amir337. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
Downloads · 30 days
0
Access
Public
Updated Dec 7, 2025
Repo size
500 KB
Likes
0
Public
Click a slice to open those files.
.json3.6 MB · 88%
From the Hugging Face model README
QLoRA
messages: [{'content': 'You are a sentiment analysis assistant. Classify the sentiment of the user's tweet as one of three classes: "negative", "neutral", or "positive". Answer with exactly one word: negative, neutral, or positive. Use lowercase only, with no punctuation or explanation.', 'role': 'system'}, {'content': 'Text: "Ben Smith / Smith (concussion) remains out of the lineup Thursday, Curtis #NHL #SJ"', 'role': 'user'}, {'content': 'neutral', 'role': 'assistant'}]
training_arguments = TrainingArguments( output_dir="tinyllama-qlora", per_device_train_batch_size=16, per_device_eval_batch_size=4, gradient_accumulation_steps=2, num_train_epochs=3, learning_rate=2e-4, lr_scheduler_type="cosine", warmup_ratio=0.03, logging_steps=50, save_strategy="epoch", save_total_limit=1, bf16=(compute_dtype == torch.bfloat16), fp16=(compute_dtype == torch.float16), optim="paged_adamw_8bit", report_to="none", ) peft_config = LoraConfig( lora_alpha=32, lora_dropout=0.05, r=16, bias="none", task_type="CAUSAL_LM", target_modules=[ "q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj", ], )
QLoRA F1 large model: 0.52
