Instructions to use tencent/Youtu-LLM-2B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tencent/Youtu-LLM-2B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tencent/Youtu-LLM-2B-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tencent/Youtu-LLM-2B-Base") model = AutoModelForCausalLM.from_pretrained("tencent/Youtu-LLM-2B-Base") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tencent/Youtu-LLM-2B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tencent/Youtu-LLM-2B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tencent/Youtu-LLM-2B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tencent/Youtu-LLM-2B-Base
- SGLang
How to use tencent/Youtu-LLM-2B-Base 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 "tencent/Youtu-LLM-2B-Base" \ --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": "tencent/Youtu-LLM-2B-Base", "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 "tencent/Youtu-LLM-2B-Base" \ --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": "tencent/Youtu-LLM-2B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tencent/Youtu-LLM-2B-Base with Docker Model Runner:
docker model run hf.co/tencent/Youtu-LLM-2B-Base
Commit History
Upload folder using huggingface_hub 16ac4cd verified
修改论文引用 (#3) 4f2e699 verified
Update README.md 2d395ce verified
Upload readme 328b698
TencentCloudADPDevRel commited on
Upload logo f4db06d
TencentCloudADPDevRel commited on
Delete logo 62a3187
TencentCloudADPDevRel commited on
Upload logo 336ca18
TencentCloudADPDevRel commited on
Update README.md 9f4857d verified
Add assets back with LFS tracking 9cc22e4
TencentCloudADPDevRel commited on
Track image files with LFS 13cebb6
TencentCloudADPDevRel commited on
fix conflict 3cf6899
TencentCloudADPDevRel commited on
Upload Youtu-LLM-2B-Base model with weights 80fad1d
TencentCloudADPDevRel commited on