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
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

vishnu-vs
/
llama

Text Generation
Transformers
PyTorch
English
llama
facebook
meta
llama-2
Model card Files Files and versions
xet
Community

Instructions to use vishnu-vs/llama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use vishnu-vs/llama with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-generation", model="vishnu-vs/llama")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("vishnu-vs/llama")
    model = AutoModelForCausalLM.from_pretrained("vishnu-vs/llama")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use vishnu-vs/llama with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "vishnu-vs/llama"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "vishnu-vs/llama",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    Use Docker
    docker model run hf.co/vishnu-vs/llama
  • SGLang

    How to use vishnu-vs/llama 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 "vishnu-vs/llama" \
        --host 0.0.0.0 \
        --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "vishnu-vs/llama",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
    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 "vishnu-vs/llama" \
            --host 0.0.0.0 \
            --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "vishnu-vs/llama",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use vishnu-vs/llama with Docker Model Runner:

    docker model run hf.co/vishnu-vs/llama
llama
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
vishnu-vs's picture
vishnu-vs
Upload 13 files
155e29b almost 3 years ago
  • .gitattributes
    1.52 kB
    initial commit almost 3 years ago
  • LICENSE
    7.02 kB
    Upload 13 files almost 3 years ago
  • Notice
    112 Bytes
    Upload 13 files almost 3 years ago
  • README.md
    21 kB
    Upload 13 files almost 3 years ago
  • USE_POLICY.md
    4.77 kB
    Upload 13 files almost 3 years ago
  • config.json
    624 Bytes
    Upload 13 files almost 3 years ago
  • generation_config.json
    132 Bytes
    Upload 13 files almost 3 years ago
  • gptq_model-4bit-128g.safetensors
    7.26 GB
    xet
    Upload 13 files almost 3 years ago
  • inference.py
    2.25 kB
    Upload 13 files almost 3 years ago
  • quantize_config.json
    185 Bytes
    Upload 13 files almost 3 years ago
  • special_tokens_map.json
    411 Bytes
    Upload 13 files almost 3 years ago
  • tokenizer.json
    1.84 MB
    Upload 13 files almost 3 years ago
  • tokenizer.model
    500 kB
    xet
    Upload 13 files almost 3 years ago
  • tokenizer_config.json
    727 Bytes
    Upload 13 files almost 3 years ago