Downloads · 30 days
28
9% of all-time downloads
davzoku/cria-llama2-7b-v1.3-q4-mlx
cria-llama2-7b-v1.3-q4-mlx is a text generation model from davzoku. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama2.
Downloads · 30 days
28
9% of all-time downloads
All-time downloads
324
Public
Parameters
1.2B
4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4 GB · 100%
How the weights are stored.
U32826M · 71%
From the Hugging Face model README
💡 Article | 💻 Github | 📔 Colab 1,2
<p align="center"> <img src="https://raw.githubusercontent.com/davzoku/cria/main/assets/icon-512x512.png" width="300" height="300" alt="Cria Logo"> <br> <i>or what ChatGPT suggests, <b>"Crafting a Rapid prototype of an Intelligent llm App using open source resources"</b>.</i> </p>krē-ə plural crias. : a baby llama, alpaca, vicuña, or guanaco.
The initial objective of the CRIA project is to develop a comprehensive end-to-end chatbot system, starting from the instruction-tuning of a large language model and extending to its deployment on the web using frameworks such as Next.js.
Specifically, we have fine-tuned the llama-2-7b-chat-hf model with QLoRA (4-bit precision) using the mlabonne/CodeLlama-2-20k dataset. This fine-tuned model serves as the backbone for the CRIA chat platform.
CRIA v1.3 comes with several variants.
This model is converted from the q4_0 GGML version of CRIA v1.3 using the llama.cpp's convert-llama-ggml-to-gguf.py script
It was trained on a Google Colab notebook with a T4 GPU and high RAM.
The following bitsandbytes quantization config was used during training:
This model was converted to MLX format from davzoku/cria-llama2-7b-v1.3.
pip install mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("davzoku/cria-llama2-7b-v1.3-q4-mlx")
response = generate(model, tokenizer, prompt="hello", verbose=True)
# 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']}")
We'd like to thank: