EmertonOmniBeagle-7B-dpo is a DPO fine-tune of
mlabonne/Monarch-7B using the
yleo/emerton_dpo_pairs_judge preference dataset created from
Intel/orca_dpo_pairs by replacing gpt 3.5 answer by a gpt4 Turbo answer. Then, LLM-Blender is used to judge between GPT4 and GPT4 Turbo.
This model uses a context window of 8k. It is compatible with different templates, like chatml and Llama's chat template.
To come...
1!pip install -qU transformers accelerate
2from transformers import AutoTokenizer
3import transformers
4import torch
5model = "yleo/EmertonMonarch-7B"
6messages = [{"role": "user", "content": "How to improve LLM fine-tuning?"}]
7tokenizer = AutoTokenizer.from_pretrained(model)
8prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
9pipeline = transformers.pipeline(
10"text-generation",
11model=model,
12torch_dtype=torch.float16,
13device_map="auto",
14)
15outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
16print(outputs[0]["generated_text"])