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

  • Log In
  • Sign Up

NinedayWang
/
PolyCoder-160M

Text Generation
Transformers
PyTorch
Safetensors
gpt_neox
text-generation-inference
Model card Files Files and versions
xet
Community
5

Instructions to use NinedayWang/PolyCoder-160M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use NinedayWang/PolyCoder-160M with Transformers:

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

    How to use NinedayWang/PolyCoder-160M with vLLM:

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

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

    How to use NinedayWang/PolyCoder-160M with Docker Model Runner:

    docker model run hf.co/NinedayWang/PolyCoder-160M
PolyCoder-160M
1.4 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 5 commits
NinedayWang's picture
NinedayWang
SFconvertbot's picture
SFconvertbot
Adding `safetensors` variant of this model (#5)
3df97b0 verified about 1 year ago
  • .gitattributes
    1.43 kB
    initial commit over 3 years ago
  • README.md
    894 Bytes
    Update README.md (#2) over 3 years ago
  • config.json
    607 Bytes
    Upload 6 files over 3 years ago
  • merges.txt
    437 kB
    Upload 6 files over 3 years ago
  • model.safetensors
    700 MB
    xet
    Adding `safetensors` variant of this model (#5) about 1 year ago
  • pytorch_model.bin
    700 MB
    xet
    Upload 6 files over 3 years ago
  • special_tokens_map.json
    438 Bytes
    Upload 6 files over 3 years ago
  • tokenizer_config.json
    659 Bytes
    Upload 6 files over 3 years ago
  • vocab.json
    981 kB
    Upload 6 files over 3 years ago