Instructions to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S # Run inference directly in the terminal: llama cli -hf stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S # Run inference directly in the terminal: llama cli -hf stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S # Run inference directly in the terminal: ./build/bin/llama cli -hf stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
Use Docker
docker model run hf.co/stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
- Llama new
- LM Studio
- Jan
- vLLM
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
- SGLang
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S 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 "stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with Ollama:
ollama run hf.co/stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
- Unsloth Desktop
- Pi
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with Docker Model Runner:
docker model run hf.co/stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
- Lemonade
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
Run and chat with the model
lemonade run user.Step-3.5-Flash-GGUF-Q4_K_S-Q4_K_S
List all available models
lemonade list
- Hermes Agent
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "stepfun-ai/Step-3.5-Flash-GGUF-Q4_K_S:Q4_K_S" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
INT8 quantization for KVCache on DGX Spark/GB10
Per the model card:
"On NVIDIA DGX Spark, the Step 3.5 Flash achieves a generation speed of 20 tokens per second; by integrating the INT8 quantization technology for KVCache, it supports an extended context window of up to 256K tokens, thus delivering long text processing capabilities on par with cloud-based inference."
Unless I missed something (possible!), this does not seem to have instructions or breadcrumbs in the model card. The provided start-up command for this GGUF on the Spark seems to limit context to 16k. Could you please provide some guidance on how to use INT8 KVCache with this Int4 GGUF on the DGX Spark? Thanks!
Sorry I’m a bit late to this discussion.
Would you mind trying the Spark usage example from this page and checking whether it works for you?
https://github.com/stepfun-ai/Step-3.5-Flash/blob/main/llama.cpp/docs/step3.5-flash.md
Thanks for the link, this is great documentation. It seems the -ctk q8_0 and -ctv q8_0 options are essential for the Int8 KVCache.
Per the guide, thus far I have held to or a little below 200k context rather than push it further. I am not currently forcing MMQ with the build flag -DGGML_CUDA_FORCE_MMQ=ON, favoring performance over a little bit of extra context window, and seeing 10-20% higher throughput for low-medium context (up to 24 t/s in the 2-8k context range).
The linked guide suggests the environment variable GGML_CUDA_ENABLE_UNIFIED_MEMORY=1, which I'm unsure is relevant for the DGX Spark. Does this have any function on the Spark, where memory is already inherently unified?
Thanks for the link, this is great documentation. It seems the
-ctk q8_0and-ctv q8_0options are essential for the Int8 KVCache.Per the guide, thus far I have held to or a little below 200k context rather than push it further. I am not currently forcing MMQ with the build flag
-DGGML_CUDA_FORCE_MMQ=ON, favoring performance over a little bit of extra context window, and seeing 10-20% higher throughput for low-medium context (up to 24 t/s in the 2-8k context range).The linked guide suggests the environment variable
GGML_CUDA_ENABLE_UNIFIED_MEMORY=1, which I'm unsure is relevant for the DGX Spark. Does this have any function on the Spark, where memory is already inherently unified?
GGML_CUDA_ENABLE_UNIFIED_MEMORY=1 allows swapping to system RAM instead of crashing when the GPU VRAM is exhausted. On my DGX Spark tests, a ~256k context would crash without this setting, but with GGML_CUDA_ENABLE_UNIFIED_MEMORY=1 it can run (but maybe hurts performance).

Adding data from a similar KV cache quantization test on DGX Spark (GB10).
Tested llama.cpp --cache-type-k q4_0 --cache-type-v q4_0 vs q8_0 vs f16 on Nemotron-3-Nano-30B-A3B at 128K context. The q8_0 approach mentioned in this thread is the right call — q4_0 has a devastating performance cliff at 64K+ context (282.7 → 21.3 tok/s prompt processing, -92.5% due to dequant overhead).
q8_0 stays within 5% of f16 speed at all context lengths while halving KV cache size. On Spark's 128GB unified memory, that's the sweet spot.
Full benchmark data with tables and methodology: https://www.linkedin.com/pulse/i-benchmarked-kv-cache-quantization-my-dgx-spark-heres-nathan-maine-szxtc