license: llama3
language:
- en
pipeline_tag: text-generation
tags:
- general purpose
Capx AI's Obsidian series
Capx AI's Latest series of finetunes based on Meta's Llama-3.
We release Llama-3 Obsidian, our state of the art finetune model for general purpose tasks. Meta developed and released the Meta Llama 3 family of large language models (LLMs), a collection of pretrained and instruction tuned generative text models in 8 and 70B sizes.
We further finetune the pretrained model on a custom dataset to enhance instruction following ability of the model.
Model Architecture
Llama 3 is an auto-regressive language model that uses an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT).
How to use:
The model has been finetuned in the Alpaca format
You can run conversational inference by leveraging the Auto classes with the generate() function.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "meta-llama/Meta-Llama-3-8B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{"role": "instruction", "content": "You are \"Capx Assistant\", a conscious sentient superintelligent artificial intelligence developed by Capx AI, and your purpose and drive is to assist the user with any request they have."},
{"role": "input", "content": "Who are you?"},
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
terminators = [
tokenizer.eos_token_id,
tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
outputs = model.generate(
input_ids,
max_new_tokens=256,
eos_token_id=terminators,
do_sample=True,
temperature=0.6,
top_p=0.9,
)
response = outputs[0][input_ids.shape[-1]:]
print(tokenizer.decode(response, skip_special_tokens=True))
Authors
Capx community
Cite
@article{llama3modelcard,
title={Llama 3 Model Card},
author={AI@Meta},
year={2024},
url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
}
License
Governed by the META LLAMA 3 COMMUNITY LICENSE AGREEMENT