Skip to content

🐛 Fix inference pad token id missing bug#198

Merged
Ssukriti merged 2 commits into
foundation-model-stack:mainfrom
gkumbhat:fix_inference_pad_id
Apr 30, 2026
Merged

🐛 Fix inference pad token id missing bug#198
Ssukriti merged 2 commits into
foundation-model-stack:mainfrom
gkumbhat:fix_inference_pad_id

Conversation

@gkumbhat
Copy link
Copy Markdown
Collaborator

@gkumbhat gkumbhat commented Apr 30, 2026

Changes

Fix inference.py to work for mistral and support pad_token_id.

Command tested:

_MAX_CONTEXT_LEN=128 _MAX_DECODE_TOKENS=64  _PROMPT_LEN=64  torchrun --nproc_per_node=4 scripts/inference.py --distributed --architecture=hf_pretrained --variant=/models/mistralai/Mistral-Small-3.1-24B-Instruct-2503 --tokenizer=/models/mistralai/Mistral-Small-3.1-24B-Instruct-2503 --device_type=aiu --unfuse_weights --compile --compile_dynamic --compile_dynamic_sendnn --default_dtype=fp16 --fixed_prompt_length=64 --max_new_tokens=64 --timing=per-token --batch_size=1

Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
Signed-off-by: gkumbhat <kumbhat.gaurav@gmail.com>
@Ssukriti Ssukriti merged commit 81502dd into foundation-model-stack:main Apr 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants