Instructions to use yuyijiong/speculative_pipeline_decoding with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yuyijiong/speculative_pipeline_decoding with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yuyijiong/speculative_pipeline_decoding")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yuyijiong/speculative_pipeline_decoding", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yuyijiong/speculative_pipeline_decoding with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yuyijiong/speculative_pipeline_decoding" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yuyijiong/speculative_pipeline_decoding", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/yuyijiong/speculative_pipeline_decoding
- SGLang
How to use yuyijiong/speculative_pipeline_decoding 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 "yuyijiong/speculative_pipeline_decoding" \ --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": "yuyijiong/speculative_pipeline_decoding", "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 "yuyijiong/speculative_pipeline_decoding" \ --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": "yuyijiong/speculative_pipeline_decoding", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use yuyijiong/speculative_pipeline_decoding with Docker Model Runner:
docker model run hf.co/yuyijiong/speculative_pipeline_decoding
Add metadata, paper/code links, and sample usage
#1
by nielsr HF Staff - opened
Hi! I'm Niels, part of the community science team at Hugging Face.
This PR improves the model card for the Speculative Pipeline Decoding checkpoints by:
- Adding YAML metadata (pipeline tag, library name, and license).
- Linking the model repository to its respective paper on the Hugging Face Hub.
- Adding a link to the official GitHub repository.
- Including a sample usage section with a code snippet from the repository to help users run inference.
Please review and merge if this looks good to you!
yuyijiong changed pull request status to merged