Skip to content

Conversation

HosseinKaviani-H
Copy link

Adds an interactive Jupyter notebook and supporting utilities to configure and run SFT training without YAML files, making experimentation more accessible.

What's New

Interactive Configuration Notebook (interactive_config_notebook.ipynb)

  • Configure training entirely in notebook cells
  • Step-by-step configuration for model, optimizer, training, parallelism
  • Two execution modes: simple (await run_actor()) or manual lifecycle control

Supporting Files

  • spawn_actor.py - Actor spawning and lifecycle management
  • trainer_actor.py - Trainer actor implementation
  • actor.py - Base actor abstractions
  • utils.py - Helper functions
  • README.md - Documentation

Example Usage

# Configure in notebook cells model_config = {"name": "llama3", "flavor": "8B", ...} training_config = {"local_batch_size": 1, "steps": 1000, ...} # Run training await run_actor(TrainerActor, cfg)

Benefits

✅ No YAML editing required
✅ Interactive experimentation
✅ Educational with clear documentation
✅ Backward compatible - CLI workflow unchanged
✅ Production-ready

Compatibility

  • ✅ No breaking changes
  • ✅ YAML-based workflow still supported
  • ✅ Works with single-GPU and multi-GPU setups

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 15, 2025
@init27
Copy link
Contributor

init27 commented Oct 16, 2025

Notebook doesnt render in diffs so leaving some suggestions here:

  1. Add explanations inline to the notebook
  2. Wrap the output or shorten it for the trainer, right now its 70% of the notebook
  3. Rename "Configure" headings-having 7 configure settings is a bit daunting

@init27 init27 self-assigned this Oct 16, 2025
Copy link

@HamidShojanazeri HamidShojanazeri left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @HosseinKaviani-H , hard to load the notebook in the PR here, so leaving notebook comments in the following:

  1. opening message "This notebook allows you to configure and run SFT training without any YAML files!"

it would be good to align with Forge message. something along these lines " This notebook introduces a seamless fine-tuning experience by abstracting away the complexities of distributed training, allowing you to configure and run SFT jobs across multiple nodes"

  1. Please add a level of explanation at the top/ intro what we user will see here, dataset, hardware requirements, capabilities etc.

  2. The "Benefits" section might not be very necessary, should be ok to remove it or replace it with some value props of Forge.

  3. Please add a reference to Forge doc for readers to educate themselves.

  4. 8 steps configuration, can we please either remove "step" from the text, we can keep Step 1 configurations then follows by different cells/ sections.

  5. "Alternative: Manual Lifecycle Control" section needs more clarification and explanation on actors and how this separation help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants