Model Description
QLoRA
Examples
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", ], )
Metrics
QLoRA F1 large model: 0.52
