Supported sequence lengths for open weight model serverless customization - Amazon SageMaker AI
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Supported sequence lengths for open weight model serverless customization

The following table shows the maximum sequence lengths (in tokens) supported for serverless customization of open weight models. For more information about serverless customization of open weight models, see Open weight model customization. For each open weight model, each populated cell shows the maximum sequence length that you can set for that customization technique and training type by using the overridable sequence-length parameters.

How to think about sequence length

The sequence length is the sum of the prompt length and the response length, and you set them independently:

  • SFT and DPO – Set dataset_max_len (the full prompt and completion length) up to the maximum in the following table.

  • RLVR and RLAIF (GRPO) – Set max_prompt_length (input budget) and max_response_length (generation budget). Their sum must stay within the model's maximum in the following table.

Keep the following tips in mind:

  • Response length can affect quality for tasks that require extended generation, such as coding or mathematical reasoning. Allocate enough max_response_length for the expected output while reserving sufficient max_prompt_length for the input.

  • Longer sequences can increase memory and compute requirements per example. Actual training time and cost depend on factors such as batching, packing, hardware utilization, and the training configuration.

  • The maximums in the following table are current ceilings. You can set any value up to that ceiling.

Provider Model Model ID SFT (LoRA) SFT (FFT) DPO (LoRA) DPO (FFT) RLVR (LoRA) RLVR (FFT) RLAIF (LoRA) RLAIF (FFT)
AlibabaQwen3.8 27Bhuggingface-vlm-qwen3-8-27b16K16K16K16K16K8K16K8K
AlibabaQwen3.6 27Bhuggingface-vlm-qwen3-6-27b16K16K16K16K16K8K16K8K
AlibabaQwen3.6 A3B 35Bhuggingface-vlm-qwen3-6-35b-a3b32K16K——16K16K16K16K
AlibabaQwen3.5 27Bhuggingface-vlm-qwen3-5-27b16K16K16K16K32K8K32K8K
AlibabaQwen3.5 9Bhuggingface-vlm-qwen3-5-9b16K16K16K16K32K16K32K16K
AlibabaQwen3.5 4Bhuggingface-vlm-qwen3-5-4b16K16K16K16K32K16K32K16K
AlibabaQwen3 32Bhuggingface-reasoning-qwen3-32b*4K*4K*4K*4K16K8K16K16K
AlibabaQwen3 14Bhuggingface-reasoning-qwen3-14b*4K*4K*4K*4K16K8K32K8K
AlibabaQwen3 8Bhuggingface-reasoning-qwen3-8b*4K*4K*4K*4K16K8K16K8K
AlibabaQwen3 4Bhuggingface-reasoning-qwen3-4b*4K*4K*4K*4K16K8K16K8K
AlibabaQwen3 1.7Bhuggingface-reasoning-qwen3-1-7b*4K*4K*4K*4K16K32K16K8K
AlibabaQwen3 0.6Bhuggingface-reasoning-qwen3-06b*4K*4K*4K*4K16K8K16K8K
AlibabaQwen2.5 Instruct 72Bhuggingface-llm-qwen2-5-72b-instruct*4K*4K*4K—16K—16K—
AlibabaQwen2.5 Instruct 32Bhuggingface-llm-qwen2-5-32b-instruct*4K*4K*4K*4K16K8K16K8K
AlibabaQwen2.5 Instruct 14Bhuggingface-llm-qwen2-5-14b-instruct*4K*4K*4K*4K16K8K16K16K
AlibabaQwen2.5 Instruct 7Bhuggingface-llm-qwen2-5-7b-instruct*4K*4K*4K*4K16K8K16K8K
DeepSeekR1 Distill Qwen 32Bdeepseek-llm-r1-distill-qwen-32b*4K*4K*4K*4K16K8K16K8K
DeepSeekR1 Distill Qwen 14Bdeepseek-llm-r1-distill-qwen-14b*4K*4K*4K*4K16K8K16K8K
DeepSeekR1 Distill Qwen 7Bdeepseek-llm-r1-distill-qwen-7b*4K*4K*4K*4K16K32K16K8K
DeepSeekR1 Distill Qwen 1.5Bdeepseek-llm-r1-distill-qwen-1-5b*4K*4K*4K*4K16K—16K8K
DeepSeekR1 Distill Llama 70Bdeepseek-llm-r1-distill-llama-70b*4K*4K*4K—16K—16K—
DeepSeekR1 Distill Llama 8Bdeepseek-llm-r1-distill-llama-8b*4K*4K*4K*4K16K8K16K8K
GoogleGemma 4 31Bhuggingface-vlm-gemma-4-31b-it32K32K32K32K16K16K16K16K
GoogleGemma 4 26B A4Bhuggingface-vlm-gemma-4-26b-a4b-it32K32K32K32K16K16K16K16K
GoogleGemma 4 E4Bhuggingface-vlm-gemma-4-e4b-it32K32K32K32K16K16K16K16K
MetaLlama 3.3 Instruct 70Bmeta-textgeneration-llama-3-3-70b-instruct*4K*4K*4K*4K16K8K16K8K
MetaLlama 3.2 Instruct 3Bmeta-textgeneration-llama-3-2-3b-instruct*4K—*4K—16K—16K—
MetaLlama 3.2 Instruct 1Bmeta-textgeneration-llama-3-2-1b-instruct*4K—*4K—16K—16K—
MetaLlama 3.1 Instruct 8Bmeta-textgeneration-llama-3-1-8b-instruct*4K—*4K—16K—16K—
Mistral AIMinistral 3 Instruct 2512 BF16 14Bhuggingface-vlm-ministral-3-14b-instruct-2512-bf1616K16K16K16K16K16K16K16K
Mistral AIMinistral 3 Instruct 2512 BF16 8Bhuggingface-vlm-ministral-3-8b-instruct-2512-bf1616K16K16K16K32K16K32K16K
Mistral AIMinistral 3 Instruct 2512 BF16 3Bhuggingface-vlm-ministral-3-3b-instruct-2512-bf1616K16K16K16K32K32K32K32K
NVIDIANemotron 3 Super 120B (A12B)huggingface-llm-nvidia-nemotron-3-super-120b-a12b-bf1616K—8K—8K—16K—
NVIDIANemotron 3 Nano 30B (A3B)huggingface-reasoning-nvidia-nemotron-3-nano-30b-a3b-bf1632K16K8K16K16K16K16K16K
NVIDIANemotron 3.5 Lightning 30B (A3B)huggingface-reasoning-nemotron-3-5-lightning-30b-a3b-bf1616K16K8K16K16K16K16K16K
OpenAIGPT OSS 120Bopenai-reasoning-gpt-oss-120b*4K—*4K—32K—32K—
OpenAIGPT OSS 20Bopenai-reasoning-gpt-oss-20b*4K*4K*4K*4K16K8K16K8K

In the preceding table, * means the sequence length is fixed at 4K and is not overridable. An em dash (—) means that the technique and training type are not supported for serverless customization on that model.