YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
Model Card for Model ID
Fine-tuned from Typhoon-7B on thai-instructions-rallio dataset. Using LoRA adaptor.
Next-up is using translation API for dataset translation. LoReFT to be tested nextly.
Model Details
Model Description
- **Developed by:** Fangyuan Yu
- **Funded by Hardeep:** [Temus]
- **Language(s) (NLP):** Thai, English
- **License:** MIT
- **Finetuned from model [optional]:** [Typhoon-7B]
Uses
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM
config = PeftConfig.from_pretrained("Ksgk-fy/thaimus-7B")
model = AutoModelForCausalLM.from_pretrained("scb10x/typhoon-7b")
model = PeftModel.from_pretrained(model, "Ksgk-fy/thaimus-7B")
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
messages = [{"role": "user", "content": "สวัสดีครับ/ค่ะ คุณเป็นอย่างไรบ้างครับ/ค่ะ?"}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
- Downloads last month
- 0
Unable to determine this model's library. Check the
docs
.