Image-Text-to-Text
Transformers
Safetensors
English
step3p7
text-generation
vision-language
multimodal
Mixture of Experts
conversational
custom_code
Eval Results
Instructions to use stepfun-ai/Step-3.7-Flash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use stepfun-ai/Step-3.7-Flash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="stepfun-ai/Step-3.7-Flash", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("stepfun-ai/Step-3.7-Flash", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use stepfun-ai/Step-3.7-Flash 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.7-Flash" # 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.7-Flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/stepfun-ai/Step-3.7-Flash
- SGLang
How to use stepfun-ai/Step-3.7-Flash 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.7-Flash" \ --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.7-Flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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.7-Flash" \ --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.7-Flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use stepfun-ai/Step-3.7-Flash with Docker Model Runner:
docker model run hf.co/stepfun-ai/Step-3.7-Flash
hengm3467 commited on
Commit ·
e03d01d
1
Parent(s): fbcee77
sync to v3 model card
Browse files- §4: rephrase availability, list partners inline, drop "Labs" from Modal
- §5.1: simpler region callout (prose + bullets with explicit base URLs)
- §6.3: use processor.decode (equivalent to processor.tokenizer.decode)
README.md
CHANGED
|
@@ -41,7 +41,7 @@ Step 3.7 Flash is built for live engineering tasks and secured a definitive seco
|
|
| 41 |
| Output | $1.15 / M tokens |
|
| 42 |
|
| 43 |
## 4. Availability, Deployment, and Ecosystem
|
| 44 |
-
- Availability: Step 3.7 Flash is available
|
| 45 |
- Deployment: Step 3.7 Flash supports flexible deployment across cloud, data center, and local environments. For large-scale production and enterprise use cases, Step 3.7 Flash can be deployed on modern data center infrastructure. For local and workstation scenarios, it can also run on high-memory devices such as NVIDIA DGX Station, AMD Ryzen AI Max+ 395-based systems, and Mac Studio / Macbook Pro devices with at least 128GB unified memory.
|
| 46 |
- Ecosystem: Step 3.7 Flash is supported across popular open-source infrastructure for both inference and model development. For inference and serving, developers can use vLLM, SGLang, Hugging Face Transformers, and llama.cpp. For model development workflows, StepFun model support has landed in the NVIDIA Megatron ecosystem, including Megatron Core and Megatron Bridge.
|
| 47 |
|
|
@@ -49,14 +49,12 @@ Step 3.7 Flash is built for live engineering tasks and secured a definitive seco
|
|
| 49 |
|
| 50 |
You can get started with Step 3.7 Flash in minutes using StepFun's API or via other inference providers.
|
| 51 |
|
| 52 |
-
>
|
| 53 |
>
|
| 54 |
-
>
|
| 55 |
-
>
|
| 56 |
-
> | Global | [platform.stepfun.ai](https://platform.stepfun.ai) | `https://api.stepfun.ai/v1` |
|
| 57 |
-
> | China | [platform.stepfun.com](https://platform.stepfun.com) | `https://api.stepfun.com/v1` |
|
| 58 |
>
|
| 59 |
-
> To avoid hard-coding the wrong region, the examples below read both
|
| 60 |
>
|
| 61 |
> ```bash
|
| 62 |
> export STEP_API_KEY="sk-..."
|
|
@@ -298,7 +296,7 @@ inputs = processor.apply_chat_template(
|
|
| 298 |
|
| 299 |
# 3. Generate
|
| 300 |
generated_ids = model.generate(**inputs, max_new_tokens=128, do_sample=False)
|
| 301 |
-
output_text = processor.
|
| 302 |
|
| 303 |
print(output_text)
|
| 304 |
```
|
|
|
|
| 41 |
| Output | $1.15 / M tokens |
|
| 42 |
|
| 43 |
## 4. Availability, Deployment, and Ecosystem
|
| 44 |
+
- Availability: Step 3.7 Flash is available on the StepFun Open Platform — [platform.stepfun.ai](https://platform.stepfun.ai) (Global) and [platform.stepfun.com](https://platform.stepfun.com) (China), OpenRouter, and NVIDIA NIM. StepFun is also partnering with DeepInfra, Fireworks AI, and Modal to expand availability soon.
|
| 45 |
- Deployment: Step 3.7 Flash supports flexible deployment across cloud, data center, and local environments. For large-scale production and enterprise use cases, Step 3.7 Flash can be deployed on modern data center infrastructure. For local and workstation scenarios, it can also run on high-memory devices such as NVIDIA DGX Station, AMD Ryzen AI Max+ 395-based systems, and Mac Studio / Macbook Pro devices with at least 128GB unified memory.
|
| 46 |
- Ecosystem: Step 3.7 Flash is supported across popular open-source infrastructure for both inference and model development. For inference and serving, developers can use vLLM, SGLang, Hugging Face Transformers, and llama.cpp. For model development workflows, StepFun model support has landed in the NVIDIA Megatron ecosystem, including Megatron Core and Megatron Bridge.
|
| 47 |
|
|
|
|
| 49 |
|
| 50 |
You can get started with Step 3.7 Flash in minutes using StepFun's API or via other inference providers.
|
| 51 |
|
| 52 |
+
> Pick the right `base_url` for your region. StepFun operates two regional platforms with separate API hosts. The `base_url` you pass to the OpenAI client must match the platform where your API key was issued, otherwise requests will be rejected as unauthorized.
|
| 53 |
>
|
| 54 |
+
> - **Global**: [platform.stepfun.ai](https://platform.stepfun.ai) — `base_url=https://api.stepfun.ai/v1`
|
| 55 |
+
> - **China**: [platform.stepfun.com](https://platform.stepfun.com) — `base_url=https://api.stepfun.com/v1`
|
|
|
|
|
|
|
| 56 |
>
|
| 57 |
+
> To avoid hard-coding the wrong region, the examples below read both the API key and base URL from environment variables. Export them once before running:
|
| 58 |
>
|
| 59 |
> ```bash
|
| 60 |
> export STEP_API_KEY="sk-..."
|
|
|
|
| 296 |
|
| 297 |
# 3. Generate
|
| 298 |
generated_ids = model.generate(**inputs, max_new_tokens=128, do_sample=False)
|
| 299 |
+
output_text = processor.decode(generated_ids[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
|
| 300 |
|
| 301 |
print(output_text)
|
| 302 |
```
|