Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

sarvamai
/
sarvam-105b

Text Generation
Transformers
Safetensors
sarvam_mla
conversational
custom_code
Model card Files Files and versions
xet
Community
12

Instructions to use sarvamai/sarvam-105b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use sarvamai/sarvam-105b with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="sarvamai/sarvam-105b", trust_remote_code=True)
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoModelForCausalLM
    model = AutoModelForCausalLM.from_pretrained("sarvamai/sarvam-105b", trust_remote_code=True, device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use sarvamai/sarvam-105b with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "sarvamai/sarvam-105b"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "sarvamai/sarvam-105b",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/sarvamai/sarvam-105b
  • SGLang

    How to use sarvamai/sarvam-105b with SGLang:

    Install from pip and serve model
    # Install SGLang from pip:
    pip install sglang
    # Start the SGLang server:
    python3 -m sglang.launch_server \
        --model-path "sarvamai/sarvam-105b" \
        --host 0.0.0.0 \
        --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "sarvamai/sarvam-105b",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
    Use Docker images
    docker run --gpus all \
        --shm-size 32g \
        -p 30000:30000 \
        -v ~/.cache/huggingface:/root/.cache/huggingface \
        --env "HF_TOKEN=<secret>" \
        --ipc=host \
        lmsysorg/sglang:latest \
        python3 -m sglang.launch_server \
            --model-path "sarvamai/sarvam-105b" \
            --host 0.0.0.0 \
            --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "sarvamai/sarvam-105b",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use sarvamai/sarvam-105b with Docker Model Runner:

    docker model run hf.co/sarvamai/sarvam-105b
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Regarding Adding it on artificialanalysis.com

👍➕ 2
#12 opened 7 months ago by
Akshat-Dwivedi

ImportError: cannot import 'is_torch_fx_available' — incompatible with transformers 5.x

#11 opened 7 months ago by
adi786

Query About sarvam-30B and sarvam-105B

#10 opened 7 months ago by
vish31iit

Waiting for smaller SoTA models and new architectures

👍 2
#8 opened 7 months ago by
Sourajit123

mlx lm support

👍 1
#7 opened 7 months ago by
Narutoouz

Security/Compliance Audit: EU AI Act & NIST Exposure

#6 opened 7 months ago by
tradeapollo

by wanbeiz - opened 10 days ago

1
#5 opened 7 months ago by
wanbeiz

Training data

1
#4 opened 7 months ago by
chintan39

плюс корова жена

❤️ 1
#3 opened 7 months ago by
Debich

Ggufs

👍 11
2
#2 opened 7 months ago by
appppy04
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs