Skip to content

Add decode check for Tunix SFT colab - #2386

Merged
copybara-service[bot] merged 1 commit into
mainfrom
hengtaoguo-sft-validation
Oct 9, 2025
Merged

Add decode check for Tunix SFT colab#2386
copybara-service[bot] merged 1 commit into
mainfrom
hengtaoguo-sft-validation

Conversation

@hengtaoguo

@hengtaoguo hengtaoguo commented Sep 23, 2025

Copy link
Copy Markdown
Collaborator

Description

Add a decode function to vllm_decode.py and its usage in Tunix SFT colab. We reuse the in-memory weights from trainer.model and apply vllm inference framework to check the decoding results.

Tests

Results from a 10-step Tunix SFT on llama3.1-8b:

Adding requests: 100%|██████████| 1/1 [00:00<00:00, 1084.36it/s]
Processed prompts: 100%|██████████| 1/1 [05:27<00:00, 327.11s/it, est. speed input: 0.14 toks/s, output: 0.20 toks/s]
Generated text:


1. Big Ben - The iconic clock tower of the Houses of Parliament, located at the north end of Westminster Bridge. 2. Buckingham Palace - The official residence of the British monarch, located in the heart of London's West End. 3. Tower Bridge - A famous landmark bridge that spans the River Thames

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

Comment thread src/MaxText/sft/sft_trainer.py
@hengtaoguo hengtaoguo changed the title Tunix SFT validation Add decode check for Tunix SFT colab Sep 24, 2025
@hengtaoguo
hengtaoguo marked this pull request as ready for review September 24, 2025 23:22
@hengtaoguo
hengtaoguo force-pushed the hengtaoguo-sft-validation branch 2 times, most recently from 15529fa to 097ddea Compare September 25, 2025 04:15
Comment thread src/MaxText/sft/vllm_decode.py Outdated
Comment thread src/MaxText/sft/vllm_decode.py Outdated
Comment thread src/MaxText/sft/vllm_decode.py Outdated
Comment thread src/MaxText/sft/vllm_decode.py Outdated
Comment thread src/MaxText/sft/vllm_decode.py Outdated
Comment thread src/MaxText/vllm_decode.py
@hengtaoguo
hengtaoguo force-pushed the hengtaoguo-sft-validation branch from 0329b0e to 56a7539 Compare September 25, 2025 22:08
Comment thread src/MaxText/examples/sft_llama3_demo.ipynb Outdated
Comment thread src/MaxText/sft/vllm_decode.py Outdated
Comment thread src/MaxText/vllm_decode.py
Comment thread src/MaxText/examples/sft_llama3_demo.ipynb
Comment thread src/MaxText/vllm_decode.py
@hengtaoguo
hengtaoguo force-pushed the hengtaoguo-sft-validation branch from 792b6a9 to 88df566 Compare September 30, 2025 05:01
@hengtaoguo
hengtaoguo force-pushed the hengtaoguo-sft-validation branch from 88df566 to c6cd1f0 Compare October 8, 2025 00:39
@hengtaoguo
hengtaoguo force-pushed the hengtaoguo-sft-validation branch 5 times, most recently from 95c4b82 to 1c873ac Compare October 8, 2025 05:03
@hengtaoguo
hengtaoguo force-pushed the hengtaoguo-sft-validation branch from 1c873ac to 08830db Compare October 8, 2025 23:26
@copybara-service
copybara-service Bot merged commit f1c0478 into main Oct 9, 2025
27 checks passed
@copybara-service
copybara-service Bot deleted the hengtaoguo-sft-validation branch October 9, 2025 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants