Downloads · 30 days
6
7% of all-time downloads
electricsheepafrica/chewie-llama-3b
chewie-llama-3b is a text generation model from electricsheepafrica. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Downloads · 30 days
6
7% of all-time downloads
All-time downloads
92
Public
Repo size
115 MB
Likes
0
Public
Click a slice to open those files.
.safetensors97.3 MB · 85%
From the Hugging Face model README

Chewie is a specialized medical Large Language Model (LLM) fine-tuned to assist Community Health Workers (CHWs) in sub-Saharan Africa. It is built on top of Llama 3.2 3B Instruct and optimized for:
pip install torch transformers peft accelerate
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "electricsheepafrica/chewie-llama-3b"
# Load Base Model + Chewie Adapter
model = AutoModelForCausalLM.from_pretrained(
"meta-llama/Llama-3.2-3B-Instruct",
device_map="auto"
)
model.load_adapter(model_id)
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-3B-Instruct")
# Run Inference
prompt = """
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are a Community Health Worker (CHW). Provide safe, structured advice.<|eot_id|><|start_header_id|>user<|end_header_id|>
Mtoto ana homa kali na shingo ngumu. Nifanye nini?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
"""
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0]))
Apache 2.0