Step-3.5-Flash
Step-3.5-Flash
Step-3.5-Flash는 StepFun의 프로덕션급 추론 엔진으로, 엘리트 지능과 값비싼 연산을 분리하고 저지연·비용 효율적인 장문 컨텍스트 추론의 어텐션 비용을 줄여, 실세계 워크플로의 자율 에이전트를 위해 설계됐어요. 하이브리드 어텐션 아키텍처(SWA/GA 3:1 비율, 128-token 윈도우), sparse MoE(196B 중 활성 11B), 3-way Multi-Token Prediction(MTP-3)을 갖추고 있어요.
여러 하드웨어 플랫폼에 최적화된 여러 양자화 형식으로 제공되며, NVIDIA H200과 AMD MI300X/MI325X/MI350X/MI355X에서 4× GPU(TP=4)로 배포돼요.
출처: 문서
본문
1. 모델 소개
Step-3.5-Flash는 StepFun의 프로덕션급 추론 엔진으로, 엘리트 지능을 무거운 연산에서 분리하고 저지연·비용 효율적인 장문 컨텍스트 추론을 위해 어텐션 비용을 줄여, 실세계 워크플로의 자율 에이전트에 특화되어 있어요. 모델은 다양한 하드웨어 플랫폼에 최적화된 여러 양자화 형식으로 제공돼요.
이 세대는 전반에 걸친 종합적인 업그레이드를 제공해요:
- 하이브리드 어텐션 아키텍처: Sliding Window Attention (SWA)과 Global Attention (GA)을 3:1 비율로 교차 배치하고 공격적인 128-token 윈도우를 사용해요. 이 하이브리드 접근은 대규모 데이터셋이나 긴 코드베이스에서 일관된 성능을 보장하면서, 일반적인 장문 컨텍스트 모델의 계산 오버헤드를 크게 줄여요.
- Sparse Mixture-of-Experts: 196B 파라미터 중 활성 11B만 사용.
- Multi-Layer Multi-Token Prediction (MTP): 3-way Multi-Token Prediction (MTP-3)을 갖추고 있어 복잡한 다단계 추론 체인을 즉각적인 응답성과 함께 지원해요.
2. SGLang 설치
Step-3.5-Flash는 현재 Docker 이미지 설치로 SGLang에서 사용할 수 있어요.
Docker (NVIDIA)
# Pull the docker image
docker pull lmsysorg/sglang:latest
# Launch the container
docker run -it --gpus all \
--shm-size=32g \
--ipc=host \
--network=host \
lmsysorg/sglang:latest bash
Docker (AMD ROCm)
# For MI300X/MI325X
docker pull lmsysorg/sglang:v0.5.9-rocm700-mi30x
# For MI350X/MI355X
docker pull lmsysorg/sglang:v0.5.9-rocm700-mi35x
docker run -it \
--device=/dev/kfd --device=/dev/dri \
--shm-size=32g \
--ipc=host \
--network=host \
--group-add video --cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
lmsysorg/sglang:v0.5.9-rocm700-mi30x bash # or mi35x for MI350X/MI355X
3. 모델 배포
이 절은 하드웨어 플랫폼과 사용 사례별로 최적화된 배포 구성을 제공해요.
3.1 기본 구성
Step-3.5-Flash 시리즈는 한 가지 크기로만 제공돼요. 권장 시작 구성은 하드웨어에 따라 달라져요.
인터랙티브 명령 생성기: 아래 구성 선택기를 사용해 하드웨어 플랫폼, 모델 크기, 양자화 방법, thinking 능력에 맞는 배포 명령을 자동 생성하세요.
3.2 구성 팁
- 메모리: 높은 VRAM 용량의 GPU가 필요해요. 지원 플랫폼: H200 (4×, TP=4), MI300X/MI325X/MI350X/MI355X (4×, TP=4 EP=4).
- AMD Docker 이미지: MI300X/MI325X에는
lmsysorg/sglang:v0.5.9-rocm700-mi30x, MI350X/MI355X에는lmsysorg/sglang:v0.5.9-rocm700-mi35x를 사용하세요. - AMD Expert Parallelism 필요: AMD GPU에서는 항상
--tp 4와 함께--ep 4를 사용하세요. BF16과 FP8 모델 모두 expert parallelism이 필요해요. EP가 없으면 MoE 중간 차원이 GPU들에 걸쳐 분할되고(N=320), AITER CK GEMM 비호환성이 발생해요. EP=4에서는 각 GPU가 72개의 전체 전문가(N=1280)를 처리하므로 cuda graph를 켠 상태에서 올바르게 동작해요. - AITER JIT 컴파일: AMD에서 첫 추론은 AITER 커널 JIT 컴파일 때문에 30-40초가 걸릴 수 있어요. 이후 요청은 캐시된 커널을 사용해요.
4. 모델 호출
4.1 기본 사용
기본 API 사용과 요청 예제는 다음을 참조하세요:
4.2 고급 사용
4.2.1 Reasoning Parser
Step-3.5-Flash는 reasoning 모드만 지원해요. 배포 시 reasoning parser를 활성화해 thinking과 content 섹션을 분리하세요:
sglang serve \
--model-path stepfun-ai/Step-3.5-Flash \
--tp 4 \
--ep 4 \
--reasoning-parser step3p5
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:30000/v1",
api_key="EMPTY"
)
# Enable streaming to see the thinking process in real-time
response = client.chat.completions.create(
model="stepfun-ai/Step-3.5-Flash",
messages=[
{"role": "user", "content": "Solve this problem step by step: What is 15% of 240?"}
],
temperature=0.7,
max_tokens=2048,
stream=True
)
# Process the stream
has_thinking = False
has_answer = False
thinking_started = False
for chunk in response:
if chunk.choices and len(chunk.choices) > 0:
delta = chunk.choices[0].delta
# Print thinking process
if hasattr(delta, 'reasoning_content') and delta.reasoning_content:
if not thinking_started:
print("=============== Thinking =================", flush=True)
thinking_started = True
has_thinking = True
print(delta.reasoning_content, end="", flush=True)
# Print answer content
if delta.content:
# Close thinking section and add content header
if has_thinking and not has_answer:
print("\n=============== Content =================", flush=True)
has_answer = True
print(delta.content, end="", flush=True)
print()
출력 예제:
=============== Thinking =================
We are asked: "What is 15% of 240?" We need to solve step by step.
Step 1: Understand that "15% of 240" means we need to calculate 15 percent of 240. In mathematical terms, it is (15/100) * 240.
Step 2: Simplify the calculation. We can compute 15% of 240 by first finding 10% of 240 and then 5% of 240, and adding them. Alternatively, we can multiply directly.
Method 1:
10% of 240 = 240 * 0.10 = 24.
5% is half of 10%, so 5% of 240 = 24 / 2 = 12.
Then 15% = 10% + 5% = 24 + 12 = 36.
Method 2: Direct multiplication: 15% = 15/100 = 0.15, so 0.15 * 240 = 36.
We can also compute fractionally: (15/100)*240 = (15*240)/100. 15*240 = 3600, divided by 100 gives 36.
Thus, the answer is 36.
We'll present the solution step by step.
=============== Content =================
To find 15% of 240, follow these steps:
1. **Convert the percentage to a decimal**:
\( 15\% = \frac{15}{100} = 0.15 \)
2. **Multiply by the number**:
\( 0.15 \times 240 = 36 \)
Alternatively, break it down:
- \( 10\% \text{ of } 240 = 240 \times 0.10 = 24 \)
- \( 5\% \text{ of } 240 = \frac{24}{2} = 12 \) (since 5% is half of 10%)
- \( 15\% = 10\% + 5\% = 24 + 12 = 36 \)
**Answer:** 36
4.2.2 Tool Calling
Step-3.5는 툴 호출 능력을 지원해요. 툴 호출 파서를 활성화하세요:
Python 예제:
sglang 서버를 시작하세요:
sglang serve \
--model-path stepfun-ai/Step-3.5-Flash \
--tp 4 \
--ep 4 \
--reasoning-parser step3p5 \
--tool-call-parser step3p5
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:30000/v1",
api_key="EMPTY"
)
# 1. define tools
tools = [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "The city name"},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"], "description": "Temperature unit"}
},
"required": ["location"]
}
}
}
]
# 2. tool run
def get_weather(location, unit="celsius"):
return f"The weather in {location} is 22°{unit[0].upper()} and sunny."
# 3. send first request
print("--- Sending first request ---")
response = client.chat.completions.create(
model="stepfun-ai/Step-3.5-Flash",
messages=[
{"role": "user", "content": "What's the weather in Beijing?"}
],
tools=tools,
temperature=1.0,
stream=False
)
message = response.choices[0].message
# 4. Handle Reasoning Content
reasoning = getattr(message, 'reasoning_content', None)
if reasoning:
print("=============== Thinking =================")
print(reasoning)
print("==========================================")
# 5. Handle Tool Calls
if message.tool_calls:
print("\n🔧 Tool Calls detected:")
history_messages = [
{"role": "user", "content": "What's the weather in Beijing?"},
message
]
for tool_call in message.tool_calls:
print(f" Tool: {tool_call.function.name}")
print(f" Args: {tool_call.function.arguments}")
args = json.loads(tool_call.function.arguments)
tool_result = get_weather(args.get("location"), args.get("unit", "celsius"))
history_messages.append({
"role": "tool",
"tool_call_id": tool_call.id,
"content": tool_result
})
print("\n--- Sending tool results ---")
final_response = client.chat.completions.create(
model="stepfun-ai/Step-3.5-Flash",
messages=history_messages,
temperature=1.0,
stream=False
)
print("=============== Final Content =================")
print(final_response.choices[0].message.content)
else:
if message.content:
print("=============== Content =================")
print(message.content)
출력 예제:
--- Sending first request ---
=============== Thinking =================
The user is asking for the weather in Beijing. I should use the get_weather function with location="Beijing". The unit parameter is optional and the user didn't specify a preference, so I'll leave it out (the default should be fine).
==========================================
🔧 Tool Calls detected:
Tool: get_weather
Args: {"location": "Beijing"}
--- Sending tool results ---
=============== Final Content =================
The weather in Beijing is 22°C and sunny.
참고:
- reasoning parser는 모델이 툴을 어떻게 사용하기로 결정하는지 보여줘요.
- 툴 호출은 함수 이름과 인자로 명확히 표시돼요.
- 그런 다음 함수를 실행하고 결과를 다시 보내 대화를 계속할 수 있어요.
5. 벤치마크
5.1 속도 벤치마크
테스트 환경:
- 하드웨어: NVIDIA H200 GPU (4x)
- 모델: Step-3.5-Flash
- Tensor Parallelism: 4
- Expert Parallelism: 4
- sglang 버전: 0.5.8
ShareGPT_Vicuna_unfiltered 데이터셋에서 SGLang의 내장 벤치마킹 도구로 성능 평가를 수행해요. 이 데이터셋은 실제 대화 데이터를 포함해 실제 사용 시나리오에서의 성능을 더 잘 반영해요.
5.1.1 표준 시나리오 벤치마크
- 모델 배포 명령:
sglang serve \
--model-path stepfun-ai/Step-3.5-Flash \
--tp 4 \
--ep 4
5.1.1.1 저동시성
- 벤치마크 명령:
python3 -m sglang.bench_serving \
--backend sglang \
--model stepfun-ai/Step-3.5-Flash \
--dataset-name random \
--random-input-len 1000 \
--random-output-len 1000 \
--num-prompts 10 \
--max-concurrency 1
- 테스트 결과:
============ Serving Benchmark Result ============
Backend: sglang
Traffic request rate: inf
Max request concurrency: 1
Successful requests: 10
Benchmark duration (s): 35.30
Total input tokens: 6091
Total input text tokens: 6091
Total generated tokens: 4220
Total generated tokens (retokenized): 4212
Request throughput (req/s): 0.28
Input token throughput (tok/s): 172.57
Output token throughput (tok/s): 119.56
Peak output token throughput (tok/s): 124.00
Peak concurrent requests: 2
Total token throughput (tok/s): 292.14
Concurrency: 1.00
----------------End-to-End Latency----------------
Mean E2E Latency (ms): 3527.94
Median E2E Latency (ms): 2884.72
P90 E2E Latency (ms): 6350.38
P99 E2E Latency (ms): 7858.53
---------------Time to First Token----------------
Mean TTFT (ms): 107.53
Median TTFT (ms): 80.93
P99 TTFT (ms): 269.52
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 8.12
Median TPOT (ms): 8.13
P99 TPOT (ms): 8.14
---------------Inter-Token Latency----------------
Mean ITL (ms): 8.12
Median ITL (ms): 8.11
P95 ITL (ms): 8.61
P99 ITL (ms): 8.91
Max ITL (ms): 20.77
==================================================
5.1.1.2 중동시성
- 벤치마크 명령:
python3 -m sglang.bench_serving \
--backend sglang \
--model stepfun-ai/Step-3.5-Flash \
--dataset-name random \
--random-input-len 1000 \
--random-output-len 1000 \
--num-prompts 80 \
--max-concurrency 16
- 테스트 결과:
============ Serving Benchmark Result ============
Backend: sglang
Traffic request rate: inf
Max request concurrency: 16
Successful requests: 80
Benchmark duration (s): 54.06
Total input tokens: 39588
Total input text tokens: 39588
Total generated tokens: 40805
Total generated tokens (retokenized): 40479
Request throughput (req/s): 1.48
Input token throughput (tok/s): 732.33
Output token throughput (tok/s): 754.84
Peak output token throughput (tok/s): 928.00
Peak concurrent requests: 21
Total token throughput (tok/s): 1487.17
Concurrency: 14.06
----------------End-to-End Latency----------------
Mean E2E Latency (ms): 9501.23
Median E2E Latency (ms): 10010.71
P90 E2E Latency (ms): 15655.09
P99 E2E Latency (ms): 18803.63
---------------Time to First Token----------------
Mean TTFT (ms): 198.34
Median TTFT (ms): 89.50
P99 TTFT (ms): 984.66
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 18.97
Median TPOT (ms): 18.80
P99 TPOT (ms): 35.67
---------------Inter-Token Latency----------------
Mean ITL (ms): 18.27
Median ITL (ms): 17.48
P95 ITL (ms): 18.44
P99 ITL (ms): 62.47
Max ITL (ms): 460.85
==================================================
5.1.1.3 고동시성
- 벤치마크 명령:
python3 -m sglang.bench_serving \
--backend sglang \
--model stepfun-ai/Step-3.5-Flash \
--dataset-name random \
--random-input-len 1000 \
--random-output-len 1000 \
--num-prompts 500 \
--max-concurrency 100
- 테스트 결과:
============ Serving Benchmark Result ============
Backend: sglang
Traffic request rate: inf
Max request concurrency: 100
Successful requests: 500
Benchmark duration (s): 125.88
Total input tokens: 249331
Total input text tokens: 249331
Total generated tokens: 252662
Total generated tokens (retokenized): 251323
Request throughput (req/s): 3.97
Input token throughput (tok/s): 1980.77
Output token throughput (tok/s): 2007.23
Peak output token throughput (tok/s): 2500.00
Peak concurrent requests: 109
Total token throughput (tok/s): 3987.99
Concurrency: 92.25
----------------End-to-End Latency----------------
Mean E2E Latency (ms): 23223.31
Median E2E Latency (ms): 22631.90
P90 E2E Latency (ms): 42269.38
P99 E2E Latency (ms): 47637.53
---------------Time to First Token----------------
Mean TTFT (ms): 372.13
Median TTFT (ms): 127.26
P99 TTFT (ms): 1880.42
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 46.06
Median TPOT (ms): 47.61
P99 TPOT (ms): 51.34
---------------Inter-Token Latency----------------
Mean ITL (ms): 45.31
Median ITL (ms): 39.86
P95 ITL (ms): 72.49
P99 ITL (ms): 117.05
Max ITL (ms): 1359.81
==================================================
5.2 정확도 벤치마크
5.2.1 GSM8K 벤치마크
- 벤치마크 명령:
python3 -m sglang.test.few_shot_gsm8k --num-questions 200
-
결과:
- Step-3.5-Flash
Accuracy: 0.885 Invalid: 0.005 Latency: 9.986 s Output throughput: 1972.911 token/s
- Step-3.5-Flash