How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="HenryJJ/llama3-8b-cqia")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM

tokenizer = AutoTokenizer.from_pretrained("HenryJJ/llama3-8b-cqia")
model = AutoModelForMultimodalLM.from_pretrained("HenryJJ/llama3-8b-cqia")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

llama3-8b-cqia

Built with Axolotl

SFT with m-a-p/COIG-CQIA. 2 epoch qlora. Code under https://huggingface.co/HenryJJ/llama3-8b-lima/blob/main/config/llama3-cqia.yml.

Model Details

  • Trained by: trained by HenryJJ.
  • Model type: llama3 is an auto-regressive language model based on the Llama 3 transformer architecture.
  • Language(s): English
  • License for llama3-8B-lima: apache-2.0 license

Prompting

Prompt format chatml: This model uses ChatML prompt format.

<|im_start|>system
You are a helpful AI assistant.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant

Example:

<|im_start|>system
You are a helpful assistant.
<|im_start|>user
who is the president of us
<|im_start|>assistant
Downloads last month
8
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train HenryJJ/llama3-8b-cqia