Skip to content

Conversation

@RexBearIU
Copy link
Collaborator

Description

Updates the Jupyter/Colab documentation to resolve setup friction and connection errors identified during testing.

Key Changes:

  • Colab (Method 1): Clarified the workflow to open notebooks directly from GitHub to avoid file import confusion.

  • TPU VM (Method 2): Moved SSH tunneling to the initial connection step. This fixes the issue where users faced connection failures by attempting to access Jupyter before the tunnel was active.

  • GRPO/GSPO: Added specific open/setup instructions for running RL demos in both environments.

If the change fixes a bug or a Github issue, please include a link, e.g.,:
FIXES: b/463414427

Notice 1: Once all tests pass, the "pull ready" label will automatically be assigned.
This label is used for administrative purposes. Please do not add it manually.

Notice 2: For external contributions, our settings currently require an approval from a MaxText maintainer to trigger CI tests.

Tests

I manually verified the updated instructions to ensure accuracy:

  1. Colab Method: Verified the "Open Notebook -> GitHub" workflow by successfully loading sft_qwen3_demo.ipynb into a fresh Colab session.
  2. TPU VM Method:
    • Created a v5e-8 TPU VM.
    • Connected using the updated SSH command (-L 8888:localhost:8888).
    • Installed and started Jupyter Lab, confirming that the localhost link worked immediately without needing a separate tunnel step.

Checklist

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

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • 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, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.


- **`rl_llama3_demo.ipynb`** → GRPO/GSPO training on math dataset (Colab/notebook)

#### GRPO/GSPO Colab Usage
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required, please remove this section.

@RexBearIU RexBearIU force-pushed the jackyf/docs/fix-tpu-colab-setup branch 7 times, most recently from 7635807 to cc876b5 Compare December 4, 2025 09:10

- **`rl_llama3_demo.ipynb`** → GRPO/GSPO training on math dataset (Colab/notebook)

#### GRPO/GSPO Colab Usage
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm, do you mean I should also remove the 'GRPO/GSPO Python Script Usage - local runs' and 'cluster runs' sections as well?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because that is irrelevant to this documentation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it! Removed.

@RexBearIU RexBearIU force-pushed the jackyf/docs/fix-tpu-colab-setup branch 3 times, most recently from 1474f2e to a78bf5c Compare December 5, 2025 08:25
…ng notebooks and connecting to local Jupyter Lab.
@RexBearIU RexBearIU force-pushed the jackyf/docs/fix-tpu-colab-setup branch from a78bf5c to f2cb1af Compare December 8, 2025 06:19
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