Downloads · 30 days
0
Ksgk-fy/thaimus-7B
thaimus-7B is a machine learning model from Ksgk-fy. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Fine-tuned from Typhoon-7B on thai-instructions-rallio dataset. Using LoRA adaptor.
Downloads · 30 days
0
Access
Public
Updated Apr 8, 2024
Repo size
13.4 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1.3 GB · 100%
From the Hugging Face model README
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.
- **Developed by:** Fangyuan Yu
- **Funded by Hardeep:** [Temus]
- **Language(s) (NLP):** Thai, English
- **License:** MIT
- **Finetuned from model [optional]:** [Typhoon-7B]
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"])
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->