Instructions to use typhoon-ai/typhoon-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use typhoon-ai/typhoon-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="typhoon-ai/typhoon-7b")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("typhoon-ai/typhoon-7b") model = AutoModelForCausalLM.from_pretrained("typhoon-ai/typhoon-7b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use typhoon-ai/typhoon-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "typhoon-ai/typhoon-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "typhoon-ai/typhoon-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/typhoon-ai/typhoon-7b
- SGLang
How to use typhoon-ai/typhoon-7b 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 "typhoon-ai/typhoon-7b" \ --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": "typhoon-ai/typhoon-7b", "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 "typhoon-ai/typhoon-7b" \ --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": "typhoon-ai/typhoon-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use typhoon-ai/typhoon-7b with Docker Model Runner:
docker model run hf.co/typhoon-ai/typhoon-7b
Commit History
-
Update README.md
Verified signature546cbbc
-
Update README.md
Verified signatureb2f1bae
-
Update README.md
Verified signaturef28580f
-
Update README.md
Verified signature8014e14
-
Adding `safetensors` variant of this model (#3)
Verified signature- Adding `safetensors` variant of this model (04ea110f98f38a0f03adfdc2863bfd23ff4f4389) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>37df9b7
-
Update README.md
35fb2f9 -
Update README.md
ae11b3a -
Update README.md
cf66261 -
Update README.md
9f806ec -
Update README.md
c27e91d -
Update README.md
036be57 -
Update README.md
4076540
-
Update README.md
f8a8c01 -
Update README.md (#1)
- Update README.md (b35fc6ffd761a017a7289e7b1d4e51cbf5defc72) Co-authored-by: Potsawee Manakul <potsawee@users.noreply.huggingface.co>64c173c -
Add Apache 2.0 License
a16914b -
Update README.md
1ce3a30
-
Update README.md
ec7e65e -
Update README.md
c9a4e9a -
Update README.md
87c426e -
Update README.md
800a6a4 -
Create README.md
d376499 -
Upload folder using huggingface_hub
850396c -
initial commit
7686191