Instructions to use dhrubasumatary/sarvam-1-quantized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use dhrubasumatary/sarvam-1-quantized with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="dhrubasumatary/sarvam-1-quantized", filename="FP16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use dhrubasumatary/sarvam-1-quantized with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf dhrubasumatary/sarvam-1-quantized # Run inference directly in the terminal: llama-cli -hf dhrubasumatary/sarvam-1-quantized
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf dhrubasumatary/sarvam-1-quantized # Run inference directly in the terminal: llama-cli -hf dhrubasumatary/sarvam-1-quantized
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf dhrubasumatary/sarvam-1-quantized # Run inference directly in the terminal: ./llama-cli -hf dhrubasumatary/sarvam-1-quantized
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf dhrubasumatary/sarvam-1-quantized # Run inference directly in the terminal: ./build/bin/llama-cli -hf dhrubasumatary/sarvam-1-quantized
Use Docker
docker model run hf.co/dhrubasumatary/sarvam-1-quantized
- LM Studio
- Jan
- vLLM
How to use dhrubasumatary/sarvam-1-quantized with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dhrubasumatary/sarvam-1-quantized" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dhrubasumatary/sarvam-1-quantized", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dhrubasumatary/sarvam-1-quantized
- Ollama
How to use dhrubasumatary/sarvam-1-quantized with Ollama:
ollama run hf.co/dhrubasumatary/sarvam-1-quantized
- Unsloth Studio new
How to use dhrubasumatary/sarvam-1-quantized with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for dhrubasumatary/sarvam-1-quantized to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for dhrubasumatary/sarvam-1-quantized to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for dhrubasumatary/sarvam-1-quantized to start chatting
- Docker Model Runner
How to use dhrubasumatary/sarvam-1-quantized with Docker Model Runner:
docker model run hf.co/dhrubasumatary/sarvam-1-quantized
- Lemonade
How to use dhrubasumatary/sarvam-1-quantized with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dhrubasumatary/sarvam-1-quantized
Run and chat with the model
lemonade run user.sarvam-1-quantized-{{QUANT_TAG}}List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)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:
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)
- Downloads last month
- 8
We're not able to determine the quantization variants.
Model tree for dhrubasumatary/sarvam-1-quantized
Base model
sarvamai/sarvam-1
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="dhrubasumatary/sarvam-1-quantized", filename="FP16.gguf", )