Views
No views yet
meta-llama/Llama-3.2-3B-Instruct with QLoRA using
LLaMA-Factory, then merging the adapter.⚠️ Educational / demo only — not tax advice. Small fine-tuned models can be inaccurate and may state outdated or incorrect figures. Verify everything against the FTA (tax.gov.ae) or a registered UAE tax agent.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "adarshsm28/uae-vat-llama3.2-3b"
5tok = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
7
8msgs = [{"role": "user", "content": "When must a business register for VAT in the UAE?"}]
9inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
10out = model.generate(inputs, max_new_tokens=256, temperature=0.3, top_p=0.9, repetition_penalty=1.1)
11print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))