|
--- |
|
language: en |
|
tags: |
|
- model |
|
- quantized |
|
- sarvam |
|
- llama |
|
- text-generation |
|
- inference |
|
base_model: |
|
- sarvamai/sarvam-1 |
|
--- |
|
|
|
# Sarvam-1 Quantized Model |
|
|
|
## Model Description |
|
The Sarvam-1 quantized model is a reduced-size version of the original Sarvam-1 model, specifically optimized for efficient inference on local machines using Ollama or similar tools. This quantization preserves the model's capabilities while significantly lowering the computational requirements, making it accessible for wider use. |
|
|
|
This model is particularly effective for generating text in 10 Indic languages (bn, gu, hi, kn, ml, mr, or, pa, ta, te) and maintains competitive performance compared to larger models like Llama-3.1-8B. |
|
|
|
## Key Features |
|
- **Quantization for Efficiency:** This model has been quantized to reduce its memory footprint and enhance inference speed, making it suitable for local deployment. |
|
- **Support for Multiple Indian Languages:** Optimized for generating text in major Indian languages alongside English. |
|
- **High-Quality Training Data:** Trained on a large, curated dataset with a focus on Indic languages, ensuring high-quality outputs. |
|
|
|
## Model Architecture |
|
- **Original Model Size:** 2 billion parameters |
|
- **Quantized Model Size:** [Specify the size if different] |
|
- **Key Features:** Retains core architecture characteristics of Sarvam-1, including token efficiency and inference capabilities. |
|
|
|
## Performance |
|
While specific quantitative performance metrics for the quantized model are not provided, it is expected to exhibit similar capabilities to the original Sarvam-1 model, particularly in handling text generation tasks in Indian languages. |
|
|
|
## Usage |
|
To utilize the quantized model, follow the instructions below: |
|
|
|
```python |
|
from transformers import AutoModelForCausalLM, AutoTokenizer |
|
|
|
# Load model and tokenizer |
|
model_name = "your_username/sarvam-1-quantized" # Replace with your model's path |
|
model = AutoModelForCausalLM.from_pretrained(model_name) |
|
tokenizer = AutoTokenizer.from_pretrained(model_name) |
|
|
|
# Example usage |
|
text = "कर्नाटक की राजधानी है:" |
|
inputs = tokenizer(text, return_tensors="pt") |
|
outputs = model.generate(**inputs, max_new_tokens=5) |
|
result = tokenizer.decode(outputs[0]) |
|
print(result) |