Text Generation
Transformers
Safetensors
English
qwen3_5_text
stream-llm
multi-stream
parallel-cognition
monitorability
qwen3.5
deltanet
custom_code
Instructions to use JonasGeiping/stream-qwen3.5-27b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use JonasGeiping/stream-qwen3.5-27b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="JonasGeiping/stream-qwen3.5-27b", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("JonasGeiping/stream-qwen3.5-27b", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("JonasGeiping/stream-qwen3.5-27b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use JonasGeiping/stream-qwen3.5-27b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "JonasGeiping/stream-qwen3.5-27b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "JonasGeiping/stream-qwen3.5-27b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/JonasGeiping/stream-qwen3.5-27b
- SGLang
How to use JonasGeiping/stream-qwen3.5-27b 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 "JonasGeiping/stream-qwen3.5-27b" \ --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": "JonasGeiping/stream-qwen3.5-27b", "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 "JonasGeiping/stream-qwen3.5-27b" \ --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": "JonasGeiping/stream-qwen3.5-27b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use JonasGeiping/stream-qwen3.5-27b with Docker Model Runner:
docker model run hf.co/JonasGeiping/stream-qwen3.5-27b
Update stream_inference.py
Browse files- stream_inference.py +0 -3
stream_inference.py
CHANGED
|
@@ -194,9 +194,6 @@ def generate(
|
|
| 194 |
# for j in range(N):
|
| 195 |
# if (j // C) < (i // C) or j == i:
|
| 196 |
# mask[0,0,i,j] = 0.0
|
| 197 |
-
# but for typical prefill sizes (n_prefill = 100-300 rows → N = 1000-3000
|
| 198 |
-
# tokens), the loop is 1-9 million iterations and takes 20-60s — long
|
| 199 |
-
# enough that users assume the Seed button is broken. Vectorized below.
|
| 200 |
rows_idx = torch.arange(N, device=device) // C
|
| 201 |
allowed = (rows_idx.unsqueeze(0) < rows_idx.unsqueeze(1)) | torch.eye(
|
| 202 |
N, dtype=torch.bool, device=device
|
|
|
|
| 194 |
# for j in range(N):
|
| 195 |
# if (j // C) < (i // C) or j == i:
|
| 196 |
# mask[0,0,i,j] = 0.0
|
|
|
|
|
|
|
|
|
|
| 197 |
rows_idx = torch.arange(N, device=device) // C
|
| 198 |
allowed = (rows_idx.unsqueeze(0) < rows_idx.unsqueeze(1)) | torch.eye(
|
| 199 |
N, dtype=torch.bool, device=device
|