Downloads · 30 days
6
10% of all-time downloads
uzzalHossen/full-llama-3.1-8B-bangla-empathy
full-llama-3.1-8B-bangla-empathy is a text generation model from uzzalHossen. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Make sure to update your transformers installation via pip install --upgrade transformers.
Downloads · 30 days
6
10% of all-time downloads
All-time downloads
58
Public
Parameters
8B
5.7 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors5.7 GB · 100%
How the weights are stored.
U87.2B · 87%
From the Hugging Face model README
Make sure to update your transformers installation via pip install --upgrade transformers.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
MODEL_ID = "uzzalHossen/llama-3.1-8b-bengali-empathetic"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
torch_dtype=torch.float16,
device_map="auto"
)
model.eval()
Run Inference
def chat(prompt):
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=128,
temperature=0.7,
top_p=0.9
)
return tokenizer.decode(output[0], skip_special_tokens=True)
print(chat("আমি খুব একা অনুভব করছি"))
This llama model was trained 2x faster with Unsloth