Downloads · 30 days
13
22% of all-time downloads
thangvip/vwen-1.5B-instruct
vwen-1.5B-instruct is a text generation model from thangvip. Use it when you need the model to write or continue text. It is set up for transformers.
LoRA SFT model Qwen2-1.5B on 600k sample of OpenHermes vietnamese (translated)
Downloads · 30 days
13
22% of all-time downloads
All-time downloads
58
Public
Parameters
1.5B
6.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
LoRA SFT model Qwen2-1.5B on 600k sample of OpenHermes vietnamese (translated)
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
Have not trained on RLHF for safety
Use the code below to get started with the model.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("thangvip/vwen-1.5B-instruct", device_map="auto", cache_dir="./cache").eval()
tokenizer = AutoTokenizer.from_pretrained("thangvip/vwen-1.5B-instruct", cache_dir="./cache")
messages = [
{'role': 'system', 'content': "bạn là trợ lý AI hữu ích"},
{"role": "user", "content": "Nước nào có diện tích lớn nhất?"},
]
text = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
inputs = tokenizer(text, return_tensors="pt")
inputs = {k: v.to("cuda") for k, v in inputs.items()}
outputs = model.generate(**inputs, tokenizer=tokenizer, max_new_tokens=256, do_sample=True, top_p=0.95, temperature=0.1, repetition_penalty=1.2, eos_token_id=tokenizer.eos_token_id, stop_strings=['<|im_end|>'])
print(tokenizer.decode(outputs[0]))
Trained on OpenHermes dataset (translated to Vietnamese) > 600k samples