Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

TechxGenus
/
Yi-9B-Coder

Text Generation
Transformers
Safetensors
llama
code
text-generation-inference
Model card Files Files and versions
xet
Community
1

Instructions to use TechxGenus/Yi-9B-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use TechxGenus/Yi-9B-Coder with Transformers:

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

    How to use TechxGenus/Yi-9B-Coder with vLLM:

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

    How to use TechxGenus/Yi-9B-Coder 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 "TechxGenus/Yi-9B-Coder" \
        --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": "TechxGenus/Yi-9B-Coder",
    		"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 "TechxGenus/Yi-9B-Coder" \
            --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": "TechxGenus/Yi-9B-Coder",
    		"prompt": "Once upon a time,",
    		"max_tokens": 512,
    		"temperature": 0.5
    	}'
  • Docker Model Runner

    How to use TechxGenus/Yi-9B-Coder with Docker Model Runner:

    docker model run hf.co/TechxGenus/Yi-9B-Coder
Yi-9B-Coder
Ctrl+K
Ctrl+K
  • 2 contributors
History: 4 commits
TechxGenus's picture
TechxGenus
Chen-01AI's picture
Chen-01AI
Update README.md with license information (#1)
178e27e verified almost 2 years ago
  • .gitattributes
    1.52 kB
    initial commit about 2 years ago
  • README.md
    1.97 kB
    Update README.md with license information (#1) almost 2 years ago
  • Yi-Coder.jpg
    250 kB
    Upload 3 files about 2 years ago
  • config.json
    696 Bytes
    Upload 3 files about 2 years ago
  • generation_config.json
    137 Bytes
    Upload folder using huggingface_hub about 2 years ago
  • model-00001-of-00004.safetensors
    4.93 GB
    xet
    Upload folder using huggingface_hub about 2 years ago
  • model-00002-of-00004.safetensors
    4.98 GB
    xet
    Upload folder using huggingface_hub about 2 years ago
  • model-00003-of-00004.safetensors
    4.97 GB
    xet
    Upload folder using huggingface_hub about 2 years ago
  • model-00004-of-00004.safetensors
    2.78 GB
    xet
    Upload folder using huggingface_hub about 2 years ago
  • model.safetensors.index.json
    35.8 kB
    Upload folder using huggingface_hub about 2 years ago
  • special_tokens_map.json
    467 Bytes
    Upload folder using huggingface_hub about 2 years ago
  • tokenizer.json
    3.56 MB
    Upload folder using huggingface_hub about 2 years ago
  • tokenizer.model
    1.03 MB
    xet
    Upload folder using huggingface_hub about 2 years ago
  • tokenizer_config.json
    917 Bytes
    Upload folder using huggingface_hub about 2 years ago