Image-Text-to-Text
MLX
Safetensors
English
step3p7
stepfun
step-3.7-flash
vision-language
multimodal
Mixture of Experts
quantized
mxfp4
microscaling
fp4
apple-silicon
text-generation
conversational
custom_code
4-bit precision
Instructions to use osmapi/Step-3.7-Flash-MXFP4-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use osmapi/Step-3.7-Flash-MXFP4-mlx with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("osmapi/Step-3.7-Flash-MXFP4-mlx") config = load_config("osmapi/Step-3.7-Flash-MXFP4-mlx") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- Pi
How to use osmapi/Step-3.7-Flash-MXFP4-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "osmapi/Step-3.7-Flash-MXFP4-mlx"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "osmapi/Step-3.7-Flash-MXFP4-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use osmapi/Step-3.7-Flash-MXFP4-mlx with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "osmapi/Step-3.7-Flash-MXFP4-mlx"
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 osmapi/Step-3.7-Flash-MXFP4-mlx
Run Hermes
hermes
| { | |
| "architectures": [ | |
| "Step3p7ForConditionalGeneration" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_step3p7.Step3p7Config", | |
| "AutoProcessor": "processing_step3.Step3VLProcessor", | |
| "AutoModelForCausalLM": "modeling_step3p7.Step3p7ForConditionalGeneration" | |
| }, | |
| "model_type": "step3p7", | |
| "im_end_token": "<im_end>", | |
| "im_patch_token": "<im_patch>", | |
| "im_start_token": "<im_start>", | |
| "image_token_len": 169, | |
| "patch_token_len": 81, | |
| "image_token_id": 128001, | |
| "understand_projector_stride": 2, | |
| "use_im_start_end": "true", | |
| "vision_select_layer": -1, | |
| "projector_bias": false, | |
| "vision_config": { | |
| "model_type": "perception_encoder", | |
| "image_size": 728, | |
| "patch_size": 14, | |
| "width": 1536, | |
| "layers": 47, | |
| "heads": 16, | |
| "pool_type": "none", | |
| "output_dim": null, | |
| "use_cls_token": false, | |
| "ls_init_value": 0.1, | |
| "use_ln_post": false, | |
| "hidden_act": "quick_gelu" | |
| }, | |
| "text_config": { | |
| "architectures": [ | |
| "Step3p5ForCausalLM" | |
| ], | |
| "rope_scaling": { | |
| "rope_type": "llama3", | |
| "factor": 2.0, | |
| "original_max_position_embeddings": 131072, | |
| "low_freq_factor": 1.0, | |
| "high_freq_factor": 32.0 | |
| }, | |
| "yarn_only_types": [ | |
| "full_attention" | |
| ], | |
| "model_type": "step3p5", | |
| "hidden_size": 4096, | |
| "intermediate_size": 11264, | |
| "num_hidden_layers": 45, | |
| "max_seq_len": 262144, | |
| "max_position_embeddings": 262144, | |
| "vocab_size": 128896, | |
| "torch_dtype": "bfloat16", | |
| "use_qk_norm": false, | |
| "moe_layers_enum": "3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44", | |
| "use_mfa": false, | |
| "num_attention_heads": 64, | |
| "num_attention_groups": 8, | |
| "head_dim": 128, | |
| "use_moe": true, | |
| "moe_num_experts": 288, | |
| "moe_top_k": 8, | |
| "moe_intermediate_size": 1280, | |
| "share_expert_dim": 1280, | |
| "moe_layer_offset": 0, | |
| "moe_every_n_layer": 1, | |
| "norm_expert_weight": true, | |
| "moe_router_activation": "sigmoid", | |
| "moe_router_scaling_factor": 3.0, | |
| "att_impl_type": "GQA", | |
| "num_nextn_predict_layers": 3, | |
| "rope_theta": [ | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0, | |
| 5000000.0, | |
| 10000.0, | |
| 10000.0, | |
| 10000.0 | |
| ], | |
| "use_head_wise_attn_gate": true, | |
| "sliding_window": 512, | |
| "use_moe_router_bias": true, | |
| "need_fp32_gate": true, | |
| "sink": false, | |
| "layer_types": [ | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "full_attention", | |
| "sliding_attention", | |
| "sliding_attention", | |
| "sliding_attention" | |
| ], | |
| "use_rope_layers": [], | |
| "partial_rotary_factors": [ | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0, | |
| 0.5, | |
| 1.0, | |
| 1.0, | |
| 1.0 | |
| ], | |
| "eos_token_id": [ | |
| 1, | |
| 2, | |
| 128007 | |
| ], | |
| "bos_token_id": 0, | |
| "attention_other_setting": { | |
| "attention_type": "sliding_attention", | |
| "num_attention_heads": 96, | |
| "num_attention_groups": 8, | |
| "head_dim": 128, | |
| "true_head_dim": 128 | |
| }, | |
| "swiglu_limits": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 7, | |
| 7, | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ], | |
| "swiglu_limits_shared": [ | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 0.0, | |
| 16, | |
| 16, | |
| 0.0, | |
| 0.0, | |
| 0.0 | |
| ] | |
| }, | |
| "quantization": { | |
| "group_size": 32, | |
| "bits": 4, | |
| "mode": "mxfp4" | |
| }, | |
| "quantization_config": { | |
| "group_size": 32, | |
| "bits": 4, | |
| "mode": "mxfp4" | |
| }, | |
| "mlx_stepfun_tensor_quantization": { | |
| "method": "tensor_level_fallback", | |
| "format": "mlx_mxfp4", | |
| "bits": 4, | |
| "group_size": 32, | |
| "mode": "mxfp4", | |
| "quantized_weight_count": 702, | |
| "note": "Generated without a native Step3p7 MLX model class. Runtime support requires a Step3p7 implementation that consumes standard MLX quantized weight/scales tensors, plus biases for affine mode." | |
| } | |
| } | |