Views
No views yet
| Hyperparameter | Value |
|---|---|
| Epochs | 50 |
| Learning rate | 1e-3 |
| Batch size | 4 |
| Gradient accumulation | 4 |
| Precision | fp16 |
| Optimizer | AdamW |
| Quantization | 4-bit nf4 |
| Loss | 0.2094 |
| Perplexity | 1.23 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = "MightyOctopus/qwen3-0.6B-lora-medical"
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id)
6
7prompt = "What are common symptoms of Type 2 diabetes?"
8inputs = tokenizer(prompt, return_tensors="pt")
9outputs = model.generate(**inputs, max_new_tokens=100)
10print(tokenizer.decode(outputs[0], skip_special_tokens=True))