cria-llama2-7b-v1.3 / README.md
davzoku's picture
create README
c653d96
|
raw
history blame
2.36 kB
metadata
inference: false
language: en
license: llama2
model_type: llama
datasets:
  - mlabonne/CodeLlama-2-20k
pipeline_tag: text-generation
tags:
  - llama-2

CRIA v1.3

💡 Article | 💻 Github | 📔 Colab 1,2

What is CRIA?

krē-ə plural crias. : a baby llama, alpaca, vicuña, or guanaco.

Cria Logo
or what ChatGPT suggests, "Crafting a Rapid prototype of an Intelligent llm App using open source resources".

This model is a llama-2-7b-chat-hf model fine-tuned using QLoRA (4-bit precision) on the mlabonne/CodeLlama-2-20k dataset and it is used to power CRIA chat.

📦 Model Release

CRIA v1.3 comes with several variants.

🔧 Training

It was trained on a Google Colab notebook with a T4 GPU and high RAM.

💻 Usage

# pip install transformers accelerate

from transformers import AutoTokenizer
import transformers
import torch

model = "davzoku/cria-llama2-7b-v1.3"
prompt = "What is a cria?"

tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
    "text-generation",
    model=model,
    torch_dtype=torch.float16,
    device_map="auto",
)

sequences = pipeline(
    f'<s>[INST] {prompt} [/INST]',
    do_sample=True,
    top_k=10,
    num_return_sequences=1,
    eos_token_id=tokenizer.eos_token_id,
    max_length=200,
)
for seq in sequences:
    print(f"Result: {seq['generated_text']}")

References

We'd like to thank:

  • mlabonne for his article and resources on implementation of instruction tuning
  • TheBloke for his script for LLM quantization.