Is 1M context length available only on BF16 weights? Is FP8 constrained to 256k?

#25
by TempleOfApshai - opened

Trying to load Laguna S 2.1 in FP8 weights defaults to 256k tokens context in vLLM. Forcing --max-model-len 1048576 throws an error. Using full BF16 safetensors immediately gives 1M context.

Is 1M only for the non-quantized versions?

Oh I think they're both 256k and the BF16 is (mis)configured to use RoPE:

(APIServer pid=672117) [transformers] Unrecognized keys in `rope_parameters` for 'rope_type'='default': {'full_attention', 'sliding_attention'}
(APIServer pid=672117) [transformers] Unrecognized keys in `rope_parameters` for 'rope_type'='default': {'full_attention', 'sliding_attention'}
(APIServer pid=672117) [transformers] The tokenizer you are loading from '/models/models--poolside--Laguna-S-2.1/snapshots/b0a9fd7c850eea9d68cf3ffc5bd5d3c5dced43c0' with an incorrect regex pattern: https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503/discussions/84#69121093e8b480e709447d5e. This will lead to incorrect tokenization. You should set the `fix_mistral_regex=True` flag when loading this tokenizer to fix this issue.

Does this mean that Laguna S 2.1 isn't actually natively 1M and the claimed 1M context is really just 256k + RoPE?

The FP8 model card on HF describes how to enable the larger than 256k context on the quantized versions. “ The weights are native 1M checkpoints: training included a long-context extension stage up to 1,048,576 tokens, and quantization was calibrated at the 1M configuration. If you need more than 256K of context, restore the 1M configuration by editing config.json”. Different temperature and top_p parameters are also recommended. “ For the best balance of quality and reliability we recommend sampling with temperature 0.7 and top_p 0.95.” In general, I have seen more problems with open code when I followed those steps and tried to use 512k ctx. This was at BF16 KV too.

Are you using "VLLM_ALLOW_LONG_MAX_MODEL_LEN=1" in vLLM?

Sign up or log in to comment