Text Generation
Transformers
Safetensors
qwen3
feature-extraction
dflash
speculative-decoding
diffusion
efficiency
flash-decoding
qwen
diffusion-language-model
custom_code
text-generation-inference
Instructions to use z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat", trust_remote_code=True) model = AutoModel.from_pretrained("z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat
- SGLang
How to use z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat 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 "z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat" \ --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": "z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat", "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 "z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat" \ --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": "z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat with Docker Model Runner:
docker model run hf.co/z-lab/LLaMA3.1-8B-Instruct-DFlash-UltraChat
Update README.md
Browse files
README.md
CHANGED
|
@@ -34,11 +34,14 @@ DFlash is now supported on SGLang. And vLLM integration is currently in progress
|
|
| 34 |
|
| 35 |
#### Installation
|
| 36 |
```bash
|
| 37 |
-
uv pip install "git+https://github.com/sgl-project/sglang.git@refs/pull/
|
| 38 |
```
|
| 39 |
|
| 40 |
#### Inference
|
| 41 |
```bash
|
|
|
|
|
|
|
|
|
|
| 42 |
export SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1
|
| 43 |
|
| 44 |
python -m sglang.launch_server \
|
|
|
|
| 34 |
|
| 35 |
#### Installation
|
| 36 |
```bash
|
| 37 |
+
uv pip install "git+https://github.com/sgl-project/sglang.git@refs/pull/20547/head#subdirectory=python"
|
| 38 |
```
|
| 39 |
|
| 40 |
#### Inference
|
| 41 |
```bash
|
| 42 |
+
export SGLANG_ENABLE_SPEC_V2=1
|
| 43 |
+
export SGLANG_ENABLE_DFLASH_SPEC_V2=1
|
| 44 |
+
export SGLANG_ENABLE_OVERLAP_PLAN_STREAM=1
|
| 45 |
export SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1
|
| 46 |
|
| 47 |
python -m sglang.launch_server \
|