Downloads · 30 days
3
9% of all-time downloads
samarthbhadane/tinyllama-msme-india
tinyllama-msme-india is a machine learning model from samarthbhadane. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
Fine-tuned TinyLlama-1.1B for Indian MSME enterprise data.
Downloads · 30 days
3
9% of all-time downloads
All-time downloads
34
Public
Repo size
7.2 MB
Likes
0
Public
Click a slice to open those files.
.safetensors9 MB · 67%
From the Hugging Face model README
Fine-tuned TinyLlama-1.1B for Indian MSME enterprise data.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained(
"TinyLlama/TinyLlama-1.1B-Chat-v1.0",
device_map="auto",
torch_dtype=torch.float16
)
model = PeftModel.from_pretrained(base_model, "samarthbhadane/tinyllama-msme-india")
tokenizer = AutoTokenizer.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0")
prompt = """<|system|>
You are a helpful assistant that provides information about MSME enterprises in India.</s>
<|user|>
Tell me about PARAG MASALA UDYOG</s>
<|assistant|>
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.3)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Apache 2.0