Skip to content

Conversation

@chrisvoncsefalvay
Copy link

Adds hyperparameter optimisation with Optuna for cloud GPU backends. Train the future without getting bankrupted in the process!

Features:

  • Distributed HPO with local Optuna orchestrator and cloud trial execution
  • Support for Huggingface Jobs, Modal and Runpod
  • TPE sampler with MedianPruner for efficient search
  • Configurable search spaces (standard, LoRA, comprehensive)
  • Budget management with cost tracking and warnings
  • SQLite persistence with optional Hub sync
  • Gradio dashboard for visualisation
  • User clarification flow before launching expensive GPU jobs

Files added:

  • hf-optuna-hpo/plugin.json - Skill metadata
  • hf-optuna-hpo/skills/optuna-hpo/SKILL.md - Main documentation
  • hf-optuna-hpo/skills/optuna-hpo/scripts/ - Python implementations
  • hf-optuna-hpo/skills/optuna-hpo/references/ - Reference documentation

TODO:

  • Nicer Gradio dash design

Introduces a new skill for hyperparameter optimisation of LLM fine-tuning
using Optuna with cloud GPU backends. Train the future without getting
bankrupted in the process!

Features:
- Distributed HPO with local Optuna orchestrator and cloud trial execution
- Support for Huggingface Jobs, Modal and Runpod
- TPE sampler with MedianPruner for efficient search
- Configurable search spaces (standard, LoRA, comprehensive)
- Budget management with cost tracking and warnings
- SQLite persistence with optional Hub sync
- Gradio dashboard for visualisation
- User clarification flow before launching expensive GPU jobs

Files added:
- hf-optuna-hpo/plugin.json - Skill metadata
- hf-optuna-hpo/skills/optuna-hpo/SKILL.md - Main documentation
- hf-optuna-hpo/skills/optuna-hpo/scripts/ - Python implementations
- hf-optuna-hpo/skills/optuna-hpo/references/ - Reference documentation

TODO:
- Extend to Runpod, maybe Modal if there's demand
- Nicer Gradio dash design
@burtenshaw
Copy link
Collaborator

This is very cool. Do you have any examples of using this?

@chrisvoncsefalvay
Copy link
Author

This is very cool. Do you have any examples of using this?

Absolutely, I use it for research projects all the time to do HPO sweeps on a subset straight from Claude. I could use a tool like WandB Sweeps, but what this gives me is the ability to just push the jobs off to HF Jobs. Go for lunch, have a (op)tuna sandwich, come back to hyperparameters on budget.

Was hoping to properly introduce it in a blogpost, but won't get to it till later this week. That'll hopefully have some screenshots and everything.

@chrisvoncsefalvay
Copy link
Author

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