Instructions to use sambanovasystems/codegen-16B-mono-toolbench with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sambanovasystems/codegen-16B-mono-toolbench with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sambanovasystems/codegen-16B-mono-toolbench")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sambanovasystems/codegen-16B-mono-toolbench") model = AutoModelForCausalLM.from_pretrained("sambanovasystems/codegen-16B-mono-toolbench", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sambanovasystems/codegen-16B-mono-toolbench with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sambanovasystems/codegen-16B-mono-toolbench" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sambanovasystems/codegen-16B-mono-toolbench", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sambanovasystems/codegen-16B-mono-toolbench
- SGLang
How to use sambanovasystems/codegen-16B-mono-toolbench 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 "sambanovasystems/codegen-16B-mono-toolbench" \ --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": "sambanovasystems/codegen-16B-mono-toolbench", "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 "sambanovasystems/codegen-16B-mono-toolbench" \ --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": "sambanovasystems/codegen-16B-mono-toolbench", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sambanovasystems/codegen-16B-mono-toolbench with Docker Model Runner:
docker model run hf.co/sambanovasystems/codegen-16B-mono-toolbench
Commit History
-
Upload folder using huggingface_hub (#1)
- f52d617679455b21d2189583463f9dadc41ec0fc65069a1d901e20a16f5eaa35 (e43b3ad6f8516c21b3ffacef76d95ee37158f2ad) - 88f72ae4c50d7655c461b778358d2ee98a3fd6378700b361151b50f3e9e819ce (e871225adc0ff292de0c7435d540df0acfbdcc2e) - 1249dfc5d587c0ffbe73fcd7bcbbfada3231a728bb35a4f2acd095414511a2d4 (a40829b07b9c23744983f01592a8bf4fcb2ccfcc) - 3817c3845596b8475c0fb782b94a534caa3cb72b3b98c3b8a29834c216fca295 (d4470215782260b11b49d2b09fc125532e9fc970) - bc05a8941dd569e554e41b9f17c25492a1e5be942a4aab124b242847e35d14da (d16d59895dccf20a46023832ba752d6f63a8e2d6)46ba44d