sreeramajay's picture
updated model card
7dbbc8c
|
raw
history blame
No virus
1.81 kB
metadata
license: apache-2.0
datasets:
  - Intel/orca_dpo_pairs
language:
  - en

Applied DPO to TinyLlama-1.1B-Chat-v1.0 using orca_dpo_pairs dataset

This is only experimental Model created by following instruction from the nice Blog Fine-tune a Mistral-7b model with Direct Preference Optimization

You can run this model using the following code:

# Format prompt
message = [
    {"role": "system", "content": "You are a helpful assistant chatbot."},
    {"role": "user", "content": "What is a Large Language Model?"}
]
tokenizer = AutoTokenizer.from_pretrained(new_model)
prompt = tokenizer.apply_chat_template(message, add_generation_prompt=True, tokenize=False)

# Create pipeline
pipeline = transformers.pipeline(
    "text-generation",
    model=new_model,
    tokenizer=tokenizer
)

# Generate text
sequences = pipeline(
    prompt,
    do_sample=True,
    temperature=0.7,
    top_p=0.9,
    num_return_sequences=1,
    max_length=200,
)
print(sequences[0]['generated_text'])
# <|system|>
# You are a helpful assistant chatbot.</s>
# <|user|>
# What is a Large Language Model?</s>
# <|assistant|>
# A Large Language Model (LLM) is a type of deep learning model that processes large amounts of text or data to improve the accuracy of natural language processing tasks such as sentiment analysis, machine translation, and question answering. LLMs are trained using large datasets, which allow them to generalize better and have better performance compared to traditional machine learning models. They are capable of handling vast amounts of text and can learn complex relationships between words, phrases, and sentences, making them an essential tool for natural language processing.