File size: 1,313 Bytes
7a27812 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | ---
language:
- en
license: apache-2.0
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
tags:
- MSME
- India
- enterprise
- peft
- lora
library_name: peft
---
# TinyLlama MSME India
Fine-tuned TinyLlama-1.1B for Indian MSME enterprise data.
## Quick Start
```python
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))
```
## Training
- **Training Data:** 10,000 MSME records
- **Steps:** 2,000
- **Final Loss:** 0.516 (train) / 0.530 (val)
- **LoRA Rank:** 8
- **GPU:** NVIDIA RTX A4000
## License
Apache 2.0
|