Downloads · 30 days
3
12% of all-time downloads
lucky2me/Dorami-Chat
Dorami-Chat is a machine learning model from lucky2me. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Dorami-Chat is a Direct Preference Optimization(DPO) model based on the Supervised Fine-tuning(SFT) model lucky2me/Dorami-Instruct
Downloads · 30 days
3
12% of all-time downloads
All-time downloads
26
Public
Parameters
102M
407 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors407 MB · 100%
From the Hugging Face model README
Dorami-Chat is a Direct Preference Optimization(DPO) model based on the Supervised Fine-tuning(SFT) model lucky2me/Dorami-Instruct
git lfs install
git clone https://huggingface.co/lucky2me/Dorami-Chat
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
model_path = "The path of the model downloaded above"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(model_path)
prompt="fill in any prompt you like."
inputs = tokenizer(prompt, return_tensors="pt")
generation_config = GenerationConfig(max_new_tokens=64, do_sample=True, top_k=2, eos_token_id=model.config.eos_token_id)
outputs = model.generate(**inputs, generation_config=generation_config)
decoded_text = tokenizer.batch_decode(outputs, skip_special_tokens=True)
print(decoded_text)