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

Yuvrajsinh0409
/
Sarvam_Pre_SFT_final_adapter

Text Generation
PEFT
Safetensors
Transformers
lora
sft
trl
conversational
Model card Files Files and versions
xet
Community

Instructions to use Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • PEFT

    How to use Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter with PEFT:

    from peft import PeftModel
    from transformers import AutoModelForCausalLM
    
    base_model = AutoModelForCausalLM.from_pretrained("/scratch/yuvraj.bodana/Sarvam_Pretrained/merged-checkpoint-7455/")
    model = PeftModel.from_pretrained(base_model, "Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter")
  • Transformers

    How to use Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter")
    messages = [
        {"role": "user", "content": "Who are you?"},
    ]
    pipe(messages)
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter with vLLM:

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

    How to use Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter 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 "Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter" \
        --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": "Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter",
    		"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 "Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter" \
            --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": "Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter",
    		"messages": [
    			{
    				"role": "user",
    				"content": "What is the capital of France?"
    			}
    		]
    	}'
  • Docker Model Runner

    How to use Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter with Docker Model Runner:

    docker model run hf.co/Yuvrajsinh0409/Sarvam_Pre_SFT_final_adapter
Sarvam_Pre_SFT_final_adapter
1.62 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
Yuvrajsinh0409's picture
Yuvrajsinh0409
Add files using upload-large-folder tool
d304c21 verified about 1 month ago
  • .gitattributes
    1.57 kB
    Add files using upload-large-folder tool about 1 month ago
  • README.md
    1.5 kB
    Add files using upload-large-folder tool about 1 month ago
  • adapter_config.json
    1.14 kB
    Add files using upload-large-folder tool about 1 month ago
  • adapter_model.safetensors
    1.58 GB
    xet
    Add files using upload-large-folder tool about 1 month ago
  • chat_template.jinja
    1.53 kB
    Add files using upload-large-folder tool about 1 month ago
  • special_tokens_map.json
    662 Bytes
    Add files using upload-large-folder tool about 1 month ago
  • tokenizer.json
    33.4 MB
    xet
    Add files using upload-large-folder tool about 1 month ago
  • tokenizer_config.json
    1.16 MB
    Add files using upload-large-folder tool about 1 month ago
  • training_args.bin
    6.29 kB
    xet
    Add files using upload-large-folder tool about 1 month ago