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

DanielClough
/
Candle_phi-2

Text Generation
Transformers
Safetensors
GGUF
English
phi
custom_code
text-generation-inference
Model card Files Files and versions
xet
Community

Instructions to use DanielClough/Candle_phi-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use DanielClough/Candle_phi-2 with Transformers:

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

    How to use DanielClough/Candle_phi-2 with vLLM:

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

    How to use DanielClough/Candle_phi-2 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 "DanielClough/Candle_phi-2" \
        --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": "DanielClough/Candle_phi-2",
    		"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 "DanielClough/Candle_phi-2" \
            --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": "DanielClough/Candle_phi-2",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use DanielClough/Candle_phi-2 with Docker Model Runner:

    docker model run hf.co/DanielClough/Candle_phi-2
Candle_phi-2
35.6 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 4 commits
danielclough
add gguf
ce811cc over 2 years ago
  • .gitattributes
    1.56 kB
    init over 2 years ago
  • Candle_phi-2_f16.gguf
    5.56 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q2k.gguf
    916 MB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q3k.gguf
    1.2 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q4_0.gguf
    1.57 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q4_1.gguf
    1.74 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q4k.gguf
    1.57 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q5_0.gguf
    1.91 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q5_1.gguf
    2.09 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q5k.gguf
    1.91 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q6k.gguf
    2.28 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q8_0.gguf
    2.96 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q8_1.gguf
    3.13 GB
    xet
    add gguf over 2 years ago
  • Candle_phi-2_q8k.gguf
    3.17 GB
    xet
    add gguf over 2 years ago
  • LICENSE
    1.08 kB
    add safetensors over 2 years ago
  • README.md
    278 Bytes
    add safetensors over 2 years ago
  • config.json
    866 Bytes
    add safetensors over 2 years ago
  • model-00001-of-00002.safetensors
    5 GB
    xet
    add safetensors over 2 years ago
  • model-00002-of-00002.safetensors
    564 MB
    xet
    add safetensors over 2 years ago
  • model.safetensors.index.json
    35.7 kB
    add safetensors over 2 years ago
  • tokenizer.json
    2.11 MB
    add safetensors over 2 years ago