Compare commits

...
Sign in to create a new pull request.

1,094 commits

Author SHA1 Message Date
Roland Tannous
678d560042 Merge remote-tracking branch 'something/feature/merge-build-main' into test-branch-some-work 2026-03-12 20:03:50 +00:00
Roland Tannous
4332c2d986 Revert "Studio (#4237)"
This reverts commit 3e1469a55a.
2026-03-12 20:01:49 +00:00
Roland Tannous
985d2e43ee Final cleanup 2026-03-12 18:28:04 +00:00
Roland Tannous
3dfa503da6
Delete studio/frontend/README.md 2026-03-12 22:20:34 +04:00
Roland Tannous
82c5a572bf
Delete studio/frontend/AGENTS.md 2026-03-12 22:20:23 +04:00
Roland Tannous
7e336049d8 Update license headers 2026-03-12 17:23:10 +00:00
Roland Tannous
810820362d
Update llm_assist.py 2026-03-12 21:06:04 +04:00
Roland Tannous
bdadc87857
Update llm_assist.py 2026-03-12 20:32:04 +04:00
Roland Tannous
c2ca1ab054
Update run.py 2026-03-12 19:28:48 +04:00
Roland Tannous
d12f88bb3b
Update run.py 2026-03-12 18:53:19 +04:00
Roland Tannous
37a072bc35
Update run.py 2026-03-12 18:30:00 +04:00
Roland Tannous
b051900282
Update studio.py 2026-03-12 18:13:56 +04:00
Roland Tannous
a28ce64289
Update install_python_stack.py 2026-03-12 18:06:37 +04:00
Roland Tannous
83ef9816a1
Update run.py 2026-03-12 18:01:14 +04:00
Roland Tannous
17029818f1
Update studio.py 2026-03-12 17:30:10 +04:00
Roland Tannous
1c86db7d15
Update studio.py 2026-03-12 17:28:08 +04:00
Roland Tannous
90e7c15748
Update setup.ps1 2026-03-12 17:11:20 +04:00
Roland Tannous
e8f8cb16cd Remove AGENTS.md from frontend folder 2026-03-12 12:00:42 +00:00
Roland Tannous
b3b3f06aa6 Remove README.md from frontend folder 2026-03-12 11:59:56 +00:00
Daniel Han
12f8525bc6
Cache packed sequence metadata to reduce D2H syncs across layers (#4243)
* packing optimziation with cache to reduce D2H copy

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* cache per device to avoid race condition for multi-gpu

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add cache freeing up func

---------

Co-authored-by: ruixiangw <ruixiangw@nvidia.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: ruixiang <wangruixiang07@outlook.com>
2026-03-12 03:37:49 -07:00
Daniel Han
3e1469a55a
Studio (#4237)
* Rebuild Studio branch on top of main

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix security and code quality issues for Studio PR #4237

- Validate models_dir query param against allowed directory roots
  to prevent path traversal in /api/models/local endpoint
- Replace string startswith() with Path.is_relative_to() for
  frontend path traversal check in serve_frontend
- Sanitize SSE error messages to not leak exception details to
  clients (4 locations in inference.py)
- Bind port-discovery socket to 127.0.0.1 instead of all interfaces
  in llama_cpp backend
- Import datasets_root and resolve_output_dir in embedding training
  function to fix NameError and use managed output directory
- Remove stale .gitignore entries for package-lock.json and test
  directories so tests can be tracked in version control
- Add venv-reexecution logic to ui CLI command matching the studio
  command behavior

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Move models_dir path validation before try/except block

The HTTPException(403) was inside the try/except Exception handler,
so it would be caught and re-raised as a 500. Moving the validation
before the try block ensures the 403 is returned directly and also
makes the control flow clearer for static analysis (path is validated
before any filesystem operations).

* Use os.path.realpath + startswith for models_dir validation

CodeQL py/path-injection does not recognize Path.is_relative_to() as
a sanitizer. Switched to os.path.realpath + str.startswith which is
a recognized sanitizer pattern in CodeQL's taint analysis. The
startswith check uses root_str + os.sep to prevent prefix collisions
(e.g. /app/models_evil matching /app/models).

* Never pass user input to Path constructor in models_dir validation

CodeQL traces taint through Path(resolved) even after a startswith
barrier guard. Fix: the user-supplied models_dir is only used as a
string for comparison against allowed roots. The Path object passed
to _scan_models_dir comes from the trusted allowed_roots list, not
from user input. This fully breaks the taint chain.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-12 03:36:19 -07:00
Roland Tannous
ba14ed3a10 Update setup.ps1 2026-03-12 02:44:25 +04:00
Roland Tannous
514c88c337 Update setup.sh 2026-03-12 02:42:43 +04:00
Roland Tannous
388187024c resolved conflicts 2026-03-11 20:58:25 +00:00
Roland Tannous
50dd169367 Merge branch 'fix/pre-merge-cleanup' into feature/merge-build-final 2026-03-11 20:56:49 +00:00
Roland Tannous
ca1f260511 refactor: remove project_root passing, use self-resolved paths and ~/.unsloth/studio
- Workers now compute backend_path and venv_t5 locally via Path(__file__)
- Moved .venv_t5 to ~/.unsloth/studio/.venv_t5
- Added ensure_studio_directories() call on server startup
- Expanded CLI studio command into sub-app with setup subcommand
2026-03-11 20:32:18 +00:00
Manan17
6fb209c045 shifting setup & co inside studio 2026-03-11 20:19:52 +00:00
Shine1i
ad538c3f83 feat(studio): add auth-specific paths and integrate auth database location 2026-03-11 20:19:52 +00:00
Shine1i
2786fd2ec1 fix(studio): update temporary directory path to use system temp dir 2026-03-11 20:19:52 +00:00
Shine1i
f002ac59fd feat(studio): studio storage roots path utilities 2026-03-11 20:19:52 +00:00
Roland Tannous
aa6521859e resolved format_conversion conflict 2026-03-11 19:53:53 +00:00
Roland Tannous
1c87a4400c fix: prefer tabular files over archives in Tier 1 dataset preview
Tier 1 check-format was picking images.zip over testmini.parquet,
causing wrong columns (image/label) and broken VLM mapping.
Also log first VLM conversion failure instead of swallowing silently.
2026-03-11 19:13:11 +00:00
Roland Tannous
15a057b577 updated on completion response markers for qwen3.5 2026-03-11 19:00:29 +00:00
Roland Tannous
b5ed4fd316 add fmpeg system support for linux and windows 2026-03-11 18:50:11 +00:00
Roland Tannous
b64613990a Remove test_llama_cpp.ps1 2026-03-11 18:18:19 +00:00
Roland Tannous
d511e7a0cd Remove test_llama_cpp.ps1 from tracking 2026-03-11 18:10:25 +00:00
Roland Tannous
0d3cf1a82e Merge pull request #375 from unslothai/feature/llm-assist-detection
Feature/llm assist detection
2026-03-11 22:02:33 +04:00
Roland Tannous
ed31a4a107 chore: merge nightly & update dataset preview dialog mapping text 2026-03-11 17:00:14 +00:00
Roland Tannous
6ab9e0025c feat: target AI Assist mapping prompts for audio & embedding models 2026-03-11 16:55:43 +00:00
Roland Tannous
4d120dc8b1 Merge remote-tracking branch 'origin/nightly' into feature/llm-assist-detection 2026-03-11 16:23:09 +00:00
Roland Tannous
949ab44103 Merge pull request #374 from unslothai/fix/model-caching-issues
Fix: Normalize HuggingFace model identifiers to lowercase
2026-03-11 18:40:26 +04:00
Roland Tannous
3b3ee40475 fix: lowercase remote Hugging Face model IDs in ModelConfig and routes to prevent caching mismatches with Unsloth 2026-03-11 14:20:25 +00:00
Roland Tannous
e0b170a8d2 Merge pull request #372 from unslothai/fix/input-focus-clipping
Input focus outline clipped by container
2026-03-11 18:12:04 +04:00
Roland Tannous
6bef024806 Merge pull request #373 from unslothai/feature/structlog-logging-system
feat: integrate structlog, configure workers for prod logging, and mi…
2026-03-11 16:52:49 +04:00
Roland Tannous
5b325ebc6e feat: integrate structlog, configure workers for prod logging, and migrate print statements 2026-03-11 12:33:16 +00:00
imagineer99
d37cea9ffd fix: scope overflow-visible to studio collapsibles 2026-03-11 11:26:43 +00:00
imagineer99
4d0a652977 fix: input focus outline clipping 2026-03-11 11:11:57 +00:00
Roland Tannous
cbef97b9f2 Merge pull request #367 from unslothai/fix/yaml-syntax
Modified to fix the yaml syntax for unsloth_Qwen3-14B-Base-unsloth-bnb-4bit
2026-03-11 13:39:48 +04:00
Roland Tannous
763ff9cac5 Merge pull request #369 from unslothai/fix/model-mappping-syntax
fixed string concatenation in model mapping
2026-03-11 12:39:13 +04:00
Samit
69c88d4971 fixed string concatenation in model mapping 2026-03-11 00:07:26 -07:00
Samit
31ee8cef33 modified to fix the yaml syntax 2026-03-10 23:58:51 -07:00
Manan Shah
e2df9a4a38 Merge pull request #365 from unslothai/fix/gguf-gemma-with-text
fixing gguf export for gemma with text
2026-03-10 17:59:22 -07:00
Manan17
780444c56b fixing gguf export for gemma with text 2026-03-11 00:58:22 +00:00
Wasim Yousef Said
6f868f08bb Merge pull request #364 from unslothai/feature/chat-seq-slider
chat seq slider
2026-03-11 01:56:48 +01:00
Shine1i
c70cb99707 chat seq slider 2026-03-11 01:41:25 +01:00
Manan Shah
b66b38998b Merge pull request #357 from unslothai/feat/embedding-models
feat: add embedding model training support
2026-03-10 14:59:20 -07:00
Manan17
20e4236526 local model's embedding nature check 2026-03-10 21:58:45 +00:00
Manan17
36bab6ee07 fix: reset isEmbeddingModel in error fallback paths to prevent stale state 2026-03-10 21:33:13 +00:00
Roland Tannous
4e0a882131 Merge pull request #363 from unslothai/feature/enable-all-modalities
Removed audio and embedding from coming soon
2026-03-11 01:32:43 +04:00
Manan17
e097ae9d1a fix: local directory dataset loading 2026-03-10 21:29:51 +00:00
imagineer99
00e0c42e8e chore: removed audio and embedding from coming soon 2026-03-10 21:29:18 +00:00
Wasim Yousef Said
4dbe27f63e Merge pull request #356 from unslothai/fix/summary-step-spacing-and-colors
Redesign summary step with consistent card layout, spacing and icons
2026-03-10 22:26:10 +01:00
Wasim Yousef Said
1669760e4d Merge pull request #362 from unslothai/feature/setup-no-llama-nuke
fix(setup): stop deleting llama.cpp in setup
2026-03-10 22:25:12 +01:00
Manan Shah
a2178dd141 Merge branch 'nightly' into feat/embedding-models 2026-03-10 14:16:05 -07:00
Roland Tannous
4ff9121a7f Merge pull request #359 from unslothai/fix/stream-manual-slice-dataset
fix: stream HF dataset when manual slice is specified
2026-03-11 01:13:51 +04:00
Manan17
f74a1e8e00 fixing embedding model search 2026-03-10 21:12:24 +00:00
Shine1i
dfab162072 fix(setup): stop nuking llama.cpp in setup 2026-03-10 22:03:01 +01:00
Wasim Yousef Said
c051ee424b Merge pull request #361 from unslothai/fix/tooltip-z-index
Increase tooltip z-index to appear above dropdowns
2026-03-10 22:01:30 +01:00
imagineer99
eed682c038 fix: increase tooltip z-index to appear above dropdowns 2026-03-10 20:57:12 +00:00
Manan17
1bede34409 fixing logging for each step 2026-03-10 20:32:40 +00:00
Roland Tannous
279afa5b0b fix: skip streaming when dataset_slice_start > dataset_slice_end
Prevents training on the wrong row range when start exceeds end by
falling back to full download where existing clamping handles it.
2026-03-10 20:21:34 +00:00
imagineer99
cfe1988f0c fix: reject negative manual dataset slices
Prevent negative Train Split Start/End values in the dataset advanced UI and sanitize payload mapping so negative slice values are never sent to the backend.

Made-with: Cursor
2026-03-10 20:13:46 +00:00
Roland Tannous
905e5a460e fix: guard against negative dataset_slice_end before streaming
Fall back to full download when dataset_slice_end is negative,
avoiding an empty stream.take(0) that would produce a broken dataset.
2026-03-10 20:12:42 +00:00
Roland Tannous
e83f7d55ce Merge pull request #354 from unslothai/fix/audio-train-completions
fix: uncheck train_on_completions for audio models
2026-03-11 00:05:51 +04:00
Roland Tannous
514a2e9671 Merge pull request #358 from unslothai/fix/sharded-gguf
fix: download all GGUF shards for split models
2026-03-11 00:05:01 +04:00
Roland Tannous
c0f0ad7baa fix: stream HF dataset when manual slice is specified
Instead of downloading the full dataset and then slicing, use
streaming mode to only fetch the rows needed (up to slice_end + 1)
when a manual dataset slice is configured.
2026-03-10 19:50:53 +00:00
Roland Tannous
2520bca631 fix: preserve zero-valued dataset slice boundaries in embedding worker
Use explicit None checks instead of falsy `or` for slice_start and
slice_end so that a valid slice_end=0 is not replaced with the full
dataset length.
2026-03-10 19:33:10 +00:00
Roland Tannous
066c0a795e fix: restrict shard siblings to exact basename and total count
startswith(prefix) could match unrelated split variants whose names
extend the selected file's prefix (e.g. model-Q8_0-v2-00001-of-...).
Now builds an exact regex from the chosen file's base prefix and shard
total so only true siblings are downloaded.
2026-03-10 19:28:26 +00:00
Shine1i
aefac3523d chore/fix(studio): add placeholder dropdowns for dataset subset and splits in disabled state 2026-03-10 20:27:11 +01:00
Roland Tannous
65e402e8db fix: pass hf_token for gated embedding models and key cache by token
- Forward hf_token to FastSentenceTransformer.from_pretrained() so
  private/gated embedding repos authenticate correctly
- Key _embedding_detection_cache by (model_name, hf_token) tuple so
  unauthenticated lookups don't shadow subsequent authenticated ones
2026-03-10 19:20:12 +00:00
Roland Tannous
670467fccc fix: use exact variant matching and shard-prefix discovery for split GGUFs
Substring matching (e.g. "Q8_0" in filename) could match superset
variants like "IQ8_0", causing wrong quantizations to be downloaded.
Now uses word-boundary regex for variant matching and discovers split
shards by shared filename prefix rather than treating all variant
matches as shards.
2026-03-10 19:13:03 +00:00
Roland Tannous
beca4aa49e fix: propagate is_embedding into worker subprocess config
start_training() cherry-picks kwargs into a config dict but was missing
is_embedding, so config.get("is_embedding", False) in worker.py always
returned False and embedding training never ran.
2026-03-10 19:05:47 +00:00
Roland Tannous
851ad7403f fix: download all GGUF shards for split models (e.g. 7B Q8_0)
LlamaCppBackend.load_model() only downloaded the first matching GGUF
file. For split models (e.g. 7B Q8_0 with 3 shards), llama-server
needs all shards present. Now collects and downloads all matching files.
2026-03-10 19:04:10 +00:00
Roland Tannous
b63bbb5731 fix: always force-uncheck trainOnCompletions for pure audio models in dataset check
Separate pure-audio from audio-VLM logic in runDatasetCheck so pure
audio models are always forced to trainOnCompletions=false regardless
of dataset type, while audio VLMs (gemma3n) only uncheck when the
dataset is audio.
2026-03-10 19:02:49 +00:00
Roland Tannous
3a2b2109d2 fix: reset isAudioModel on model config fetch failure
Clear stale isAudioModel in the fallback path when getModelConfig
fails, preventing a previously-selected audio model's flag from
leaking into the next model selection.
2026-03-10 19:00:56 +00:00
Roland Tannous
c87fdf079c feat: add embedding model training support
Add end-to-end embedding/sentence-transformer training pipeline using
FastSentenceTransformer, SentenceTransformerTrainer, and
MultipleNegativesRankingLoss with BatchSamplers.NO_DUPLICATES.

Backend:
- Add is_embedding_model() detection via HF tags + pipeline_tag
- Add /check-embedding/ API route and EmbeddingCheckResponse
- Extend derive_model_type() to return "embeddings"
- Add _run_embedding_training() in worker.py with progress callbacks,
  stop handling, LoRA (task_type=FEATURE_EXTRACTION), and model saving
- Add is_embedding field to TrainingStartRequest and ModelDetails
- Add YAML configs for 5 models: all-MiniLM-L6-v2, bge-m3,
  embeddinggemma-300m, gte-modernbert-base, Qwen3-Embedding-0.6B

Frontend:
- Wire isEmbeddingModel flag through store, API types, and mappers
- Force packing=false, train_on_completions=false, warmup_ratio=0.03
- Hide packing and train_on_completions checkboxes for embedding models
- Auto-set modelType to "embeddings" from backend model_type response
2026-03-10 18:10:09 +00:00
Roland Tannous
3e3d221381 fix: improve advisor prompts for more reliable column role assignment
- Pass 1: clearer definition of "conversational" vs non-conversational,
  constrained dataset_type to specific enum values
- Pass 2: much more explicit worked examples with step-by-step reasoning,
  added "skip" role for metadata columns, stronger reminder at end that
  all-user is wrong
- Pass 3: returns raw text instead of JSON for cleaner system prompts,
  removed system message to give model more freedom
2026-03-10 18:01:20 +00:00
Roland Tannous
436821f0b6 fix: uncheck train_on_completions for audio models
Pure audio models (orpheus, sparktts, whisper, sesame-csm) now
always have trainOnCompletions auto-unchecked when selected.
Gemma3n (audio_vlm) only unchecks when the dataset is audio.

- Add is_audio to frontend ModelConfigResponse (backend already returns it)
- Add isAudioModel state to training config store
- Auto-set trainOnCompletions=false for pure audio models on model load
- Auto-set trainOnCompletions=false for audio VLMs when dataset is audio
- Respect manual user override via existing _trainOnCompletionsManuallySet flag
2026-03-10 17:39:35 +00:00
imagineer99
fd3b55df77 fix: redesign summary step with consistent card layout, icons, and compact spacing 2026-03-10 17:38:10 +00:00
Roland Tannous
afb374da07 Merge pull request #353 from unslothai/feat/dataset-shortlist-and-model-type
Curated dataset shortlists and model type plumbing
2026-03-10 21:31:16 +04:00
Roland Tannous
8f1df91a9d refactor: advisor maps columns to roles instead of generating templates
The advisor now only assigns columns to user/assistant roles and
generates a system prompt. Templates (user_template, assistant_template)
are removed entirely — the LLM was frequently putting all columns in
user or copying actual data values into templates.

Column values are now used directly as message content, grouped and
concatenated by role. This is simpler, more robust, and prevents the
class of bugs where the advisor generates bad template content.
2026-03-10 17:17:27 +00:00
Roland Tannous
f919e3e654 feat: add model_type field to backend /config and /list responses
Derive a single model_type string ("text" | "vision" | "audio" | "embeddings")
from existing is_vision and audio_type detection, so the frontend doesn't have
to infer modality from scattered boolean flags.
2026-03-10 16:54:19 +00:00
Roland Tannous
e087a4a72b fix: improve Pass 2 prompt to correctly split INPUT/OUTPUT columns
The LLM was putting all columns in user_template (e.g. summarization
dataset had both document AND summary as user input). Fixed by:

- Reframed system message: explicitly states user=INPUT, assistant=OUTPUT
- Added 4 concrete correct examples (summarization, NLI, translation, QA)
  showing exactly how to split columns
- Added "NEVER put the output/target column in the user template" rule
- Added sanity check: if assistant_template has no column placeholders,
  reject the result and fall back to simple classification
2026-03-10 16:47:50 +00:00
Roland Tannous
86f491d75a fix: include label mapping in Pass 3 system prompt generation
Pass 3 now sees the label mapping from Pass 2 (e.g. "0 = does not follow,
1 = follows, 2 = entailed") so the generated system prompt can explain
what each label value means. Also bumped to 2-4 sentences to give room
for the label descriptions.
2026-03-10 16:21:54 +00:00
Roland Tannous
8e7f27d2da feat: Beta badge, generated System column, fix table scroll
- Add "Beta" badge next to AI Assist button text
- When advisor generates a system prompt, show it as a "System (generated)"
  column prepended to the data table so user can see it alongside data
- Fix table being squished to near-zero height when advisor notification
  banner is present: add min-h-[250px] to table wrapper, change body
  from overflow-hidden to overflow-auto
2026-03-10 16:14:16 +00:00
Roland Tannous
2c4c9b87cf refactor: 3-pass advisor — dedicated system prompt generation
Pass 1: Classify dataset type (unchanged)
Pass 2: Generate user/assistant templates + label mapping + column roles
  (system_prompt removed from this pass to keep it focused)
Pass 3: Generate system prompt (only for non-conversational datasets)
  - Dedicated pass with focused prompt that sees the templates from Pass 2
  - Skipped entirely for conversational datasets
  - Produces specific, task-relevant system prompts
2026-03-10 16:07:30 +00:00
Roland Tannous
109cd940c0 fix: show generated templates in UI, make system prompt optional
- System prompt is now optional — LLM only generates one when the task
  is ambiguous from the data alone (persona, domain, format constraints)
- Sanitize system_prompt extraction (handle literal "null" string)
- Show system prompt, user template, and assistant template in the
  advisor notification banner so user can see exactly what was generated
- Templates displayed in monospace with labeled sections
2026-03-10 16:01:57 +00:00
Roland Tannous
91b56f502f fix: remove Pass 3 self-scoring, trust Pass 2 output directly
The LLM was bad at scoring its own conversion quality — rejecting good
Pass 2 output (score 5/10 for a perfectly usable conversion). Instead:
- Remove Pass 3 entirely (saves ~0.4s and one inference call)
- Trust Pass 2 output and return it to the user
- Build notification from Pass 1 classification info instead
- User can always adjust mapping via dropdowns if they disagree
2026-03-10 15:56:48 +00:00
Roland Tannous
b1a5a88cb9 fix: advisor quality gate, better prompts, always show AI Assist button
- Reject advisor result when Pass 3 scores < 6 or is_acceptable=false,
  falls back to simple column classification instead of using bad output
- Improved Pass 2 prompt: explicit rules for label_mapping completeness,
  {column_name} vs {column_name_name} for mapped labels, column_roles
  must match which template uses them
- Build suggested_mapping from ALL template-referenced columns (not just
  first match per role) — fixes hypothesis being dropped from SNLI mapping
- Guard against LLM returning literal string "null" for revised_system_prompt
- Always show AI Assist button when available, even when mapping looks complete
2026-03-10 15:51:14 +00:00
Roland Tannous
4cef5fb030 fix: harden template mapping for complex column types and curly braces
- Handle dict columns (e.g. squad answers) by extracting text instead
  of raw repr()
- Handle list columns by joining or extracting single value
- Catch ValueError in .format() calls (stray { } in column data)
- Add missing json import to dataset_utils.py
2026-03-10 15:43:35 +00:00
Roland Tannous
c5ffe1e724 feat: Dataset Conversion Advisor — multi-pass LLM for non-conversational datasets
Non-conversational HF datasets (e.g. stanfordnlp/snli) were naively mapped
column→role, producing poor training results. The AI Assist button now runs
a 3-pass advisor using Qwen 7B that:
1. Fetches the HF dataset card/README to understand the dataset purpose
2. Classifies the dataset type and determines if conversion is needed
3. Generates a system prompt, user/assistant templates with {column}
   placeholders, and label mappings (e.g. 0→entailment)
4. Validates the conversion quality (score ≥7/10 required)

Architecture: advisor metadata flows as __-prefixed keys in
custom_format_mapping (e.g. __system_prompt, __user_template,
__assistant_template, __label_mapping). The existing _apply_user_mapping()
detects these keys and routes to template-based conversation construction.
No __ keys = existing simple mode (backwards compatible).

Backend: upgraded llm_assist.py (7B default, multi-pass advisor,
HF card fetching), extended API models, added _apply_template_mapping()
to dataset_utils.py.

Frontend: extended store with advisor state fields, wired AI Assist
to store templates/system prompt, inject __ metadata in training request,
show advisor notification banner in mapping card.
2026-03-10 15:39:56 +00:00
Roland Tannous
12b53ca260 fix: download all GGUF shards for split models (e.g. 7B Q8_0)
LlamaCppBackend.load_model() and precache_helper_gguf() only downloaded
the first matching GGUF file. For split models (e.g. 7B Q8_0 with 3
shards), llama-server needs all shards present. Now collects and
downloads all matching files.
2026-03-10 15:08:20 +00:00
Roland Tannous
20264e973e debug: decode first sample after train_on_completions masking 2026-03-10 14:08:14 +00:00
imagineer99
23ac450a90 rename: tts model type to audio for broader category support 2026-03-10 13:28:49 +00:00
Roland Tannous
9fd08a3f25 debug: fix dataset access - result is a dict, use dataset['dataset'] 2026-03-10 13:19:31 +00:00
imagineer99
faf8351825 feat: infer tts model type from backend is_audio flag 2026-03-10 12:57:40 +00:00
Roland Tannous
a5d9f611e6 debug: improve sample preview with type info and traceback 2026-03-10 12:56:24 +00:00
Roland Tannous
10ba97c34c debug: switch to print() for subprocess visibility 2026-03-10 12:49:01 +00:00
Roland Tannous
19cbf575ac debug: add temporary log statements for dataset preview and VLM instruction 2026-03-10 12:35:55 +00:00
imagineer99
1b34293a53 feat: curated dataset shortlists and model type plumbing 2026-03-10 12:00:09 +00:00
Roland Tannous
5d97f42af4 feat: add AI Assist button for user-triggered column classification
Move LLM-assisted column mapping from silent /check-format automation
to an explicit "AI Assist" button in the dataset mapping dialog. This
makes the feature transparent and user-controlled.

- Remove llm_classify_columns() from check_dataset_format() (heuristic-only)
- Remove auto-save suggested_mapping from use-training-actions.ts
- Add POST /api/datasets/ai-assist-mapping endpoint (receives preview
  samples from frontend, no dataset re-loading needed)
- Add AiAssistMappingRequest/Response models
- Add aiAssistMapping() frontend API function
- Add Sparkles AI Assist button to DatasetMappingCard with loading state
- Wire up handleAiAssist handler in dataset-preview-dialog.tsx
2026-03-10 11:09:01 +00:00
Roland Tannous
19ffb79e78 Merge pull request #343 from unslothai/fix/cli-changes
Fix/cli changes
2026-03-10 14:38:35 +04:00
Roland Tannous
4ea0b3cf28 Merge pull request #352 from unslothai/fix/cancel-training
Fix/cancel training
2026-03-10 14:38:30 +04:00
Roland Tannous
4523f056c2 fix: LLM-assisted mapping flows from /check-format to training
- Frontend auto-saves suggested_mapping into datasetManualMapping when
  check-format returns requires_manual_mapping=false, so the mapping
  flows to training via custom_format_mapping (no redundant AI calls)
- Backend returns meaningful warning when column detection fails
  (LLM-generated or static fallback) for both text and VLM datasets
- /check-format endpoint merges check_dataset_format warnings with
  existing URL-based image detection warnings
2026-03-10 09:58:58 +00:00
Roland Tannous
afad614bfa feat: add LLM-assisted dataset detection using ephemeral GGUF helper
Uses Qwen2.5-3B-Instruct Q8_0 via LlamaCppBackend to complement
heuristic-based dataset detection when heuristics are uncertain.

- New llm_assist.py: VLM instruction generation, column classification,
  and user-friendly warning generation for dataset issues
- Pre-cache helper GGUF on FastAPI startup (background thread)
- Reorder training pipeline: dataset processing runs BEFORE model load
  to avoid VRAM contention (detect → dataset → model → train)
- Add pre_detect_and_load_tokenizer() for lightweight detection
- LLM warnings on VLM conversion failures (broken URLs, missing images)
- LLM column classification fallback when heuristics return unknown
- Graceful degradation: all paths unchanged when helper unavailable
2026-03-10 09:20:45 +00:00
Manan17
41bc28f076 distinguish cancel and stop for force terminate 2026-03-10 02:35:32 +00:00
Manan17
068e34bc1d fixing cancel training 2026-03-10 02:20:56 +00:00
Roland Tannous
22eb0eea29 Revert "Merge pull request #347 from unslothai/feature/studio-storage-roots"
This reverts commit e9c7b97d23, reversing
changes made to b75cc9b959.
2026-03-10 01:52:47 +00:00
Manan17
085f4dfb3e CLI fix for backend changes 2026-03-10 01:51:00 +00:00
Roland Tannous
e9c7b97d23 Merge pull request #347 from unslothai/feature/studio-storage-roots
update studio storage roots
2026-03-10 05:49:42 +04:00
Roland Tannous
b75cc9b959 Merge pull request #350 from unslothai/fix/vision-datasets-fix
Fix VLM dataset detection and conversion
2026-03-10 05:48:27 +04:00
Roland Tannous
0a81ee38e6 fix: fall back to auto-detection when user VLM mapping fails
Instead of erroring out when custom_format_mapping fails conversion,
clear it and let auto-detection try. Handles stale cached mappings.
2026-03-10 01:42:25 +00:00
Roland Tannous
2ce77f8879 fix: probe image column candidates when multiple exist
When multiple image columns are found, probes them (HEAD for URLs,
os.path.exists for paths) and picks the first that works.
Skips probing when top candidate is PIL/dict (score >= 75).
2026-03-10 01:38:33 +00:00
Roland Tannous
b515ce6a7d fix: prefer URL image columns over bare filenames, add value-based fallback
find_image_column now scores candidates by resolvability (PIL > dict > URL > path)
and has a Pass 2 value-based fallback for columns not matching image keywords.
Fixes phiyodr/coco2017 picking file_name (unresolvable) over coco_url (resolvable).
2026-03-10 01:36:19 +00:00
Roland Tannous
698c9564ef fix: detect list-of-strings text columns and pick random element for VLM conversion
Handles datasets like phiyodr/coco2017 where captions is a list of strings.
2026-03-10 01:32:19 +00:00
Roland Tannous
095a051ee0 feat: add ShareGPT+image VLM format support and improve image column detection
- Detect and convert ShareGPT/ChatML conversations with <image> placeholders
- Add file_name/filename as image column keywords
- Detect image paths and URLs by value (string ending in .jpg/.png/etc)
2026-03-10 01:27:36 +00:00
Roland Tannous
87269a5c85 fix: use word-boundary matching for image/audio column detection
Substring matching caused false positives like 'pic' in 'topic',
leading to non-deterministic image column selection.
2026-03-10 00:38:02 +00:00
Manan17
8ce792b341 shifting setup & co inside studio 2026-03-09 23:48:31 +00:00
Shine1i
f2b2b33769 feat(studio): add auth-specific paths and integrate auth database location 2026-03-09 23:48:31 +00:00
Shine1i
c2871fcff8 fix(studio): update temporary directory path to use system temp dir 2026-03-09 23:48:31 +00:00
Shine1i
b08b606b21 feat(studio): studio storage roots path utilities 2026-03-09 23:48:31 +00:00
Roland Tannous
d56c1c8dde fix: resolve bare-filename images via HF repo lookup
Datasets like VQAonline store image filenames (e.g. "img.png") without
the directory prefix. Build a basename→repo_path lookup using
list_repo_files, then resolve each file via hf_hub_download.
2026-03-09 23:37:00 +00:00
Roland Tannous
bd4de6cf1f fix: prefer tabular files over archives in Tier 1 dataset preview
Tier 1 check-format was picking images.zip over testmini.parquet,
causing wrong columns (image/label) and broken VLM mapping.
Also log first VLM conversion failure instead of swallowing silently.
2026-03-09 22:00:20 +00:00
Roland Tannous
4ceaeb3649 Merge pull request #349 from unslothai/license/agpl3-studio
Add AGPL-3.0 SPDX headers to all source files
2026-03-10 00:30:29 +04:00
Roland Tannous
a0f03d3080 Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
Roland Tannous
2916a2dfcb Merge pull request #348 from unslothai/license/agpl3-studio
Main license file for studio codebase
2026-03-09 23:38:08 +04:00
Roland Tannous
11aa870d96 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
Wasim Yousef Said
36b297c79b Merge pull request #344 from unslothai/style/ui-feedback
Refine UI spacing, icons, and border radius per feedback
2026-03-09 19:24:12 +01:00
Wasim Yousef Said
5a0eb7e646 Merge pull request #345 from unslothai/feature/fixes-client
feat(studio): fix chat code block actions and some training view changes
2026-03-09 19:22:19 +01:00
Shine1i
d31420acc3 feat(recipe-studio): add support for managing tools by provider in tool profiles 2026-03-09 19:19:14 +01:00
Shine1i
992e07495f Merge remote-tracking branch 'origin/nightly' into feature/fixes-client 2026-03-09 19:07:42 +01:00
Roland Tannous
65d3539bac Merge pull request #342 from unslothai/local-dataset
dataset upload
2026-03-09 21:22:23 +04:00
Roland Tannous
3745e06776 store uploaded datasets under assets/datasets/uploads instead of ~/.cache 2026-03-09 17:06:36 +00:00
Roland Tannous
0d26de7d50 Revert "narrow stale selection guard to only skip clearing for uploaded files"
This reverts commit 7825558f1b.
2026-03-09 16:51:30 +00:00
Roland Tannous
b8dd4e2615 Merge pull request #346 from unslothai/fix/eval-loss-worker-filtering
fix: eval loss broken after subprocess isolation refactor
2026-03-09 20:43:19 +04:00
Roland Tannous
a8992279b6 fix: split dataset 80/20 when eval split matches train split 2026-03-09 16:36:44 +00:00
Shine1i
b9f2820cd6 chore(data-recipe): bump data-designer to 0.5.2 and pin duckdb<1.5 2026-03-09 17:27:02 +01:00
Roland Tannous
73c4027d70 fix: disable Start Training when eval_steps set without eval split 2026-03-09 16:20:00 +00:00
Shine1i
7c153f6a53 feat(recipe-studio): remove MCP tools-related dialogs and refactor tool profile management logic 2026-03-09 17:04:15 +01:00
Roland Tannous
a7d78d16be fix: restore eval_enabled early signal for subprocess training 2026-03-09 15:35:49 +00:00
Shine1i
24cb20c076 feat(recipe-studio): improve UI responsiveness and fix JSON preview handling 2026-03-09 16:04:46 +01:00
Roland Tannous
d85176ba1a fix: allow eval-only progress events through worker callback filter 2026-03-09 14:39:49 +00:00
Shine1i
984a762063 feat(studio): centralize chart styling and formatting 2026-03-09 15:34:15 +01:00
Roland Tannous
7825558f1b narrow stale selection guard to only skip clearing for uploaded files 2026-03-09 14:01:02 +00:00
Roland Tannous
8d81c991f8 switch dataset upload from base64 JSON to multipart/form-data with streamed writes 2026-03-09 13:55:45 +00:00
Roland Tannous
07ba02d610 include all candidate files when scanning a directory, not just the first 2026-03-09 13:52:45 +00:00
Shine1i
87f982aa3f feat(studio): rework chart settings with a new preferences store and revamped settings UI 2026-03-09 14:47:20 +01:00
Roland Tannous
7c8c416b32 add client-side file size validation before upload 2026-03-09 13:38:00 +00:00
Roland Tannous
ee6d5c124d normalize uploaded filename extension to lowercase for consistent downstream checks 2026-03-09 13:35:55 +00:00
imagineer99
b5cea7ea1e style: reduce border radius on onboarding summary cards 2026-03-09 13:33:00 +00:00
Roland Tannous
dd24009f06 Merge pull request #340 from unslothai/fix/auth-audio
Added auth to audio generate endpoint
2026-03-09 17:25:49 +04:00
Roland Tannous
808239095c Merge pull request #338 from unslothai/fix/trust-code
Exposed trust_remote_code through the UI
2026-03-09 17:19:56 +04:00
Roland Tannous
dcedc4df56 merge nightly, resolve conflict in use-chat-model-runtime 2026-03-09 13:19:17 +00:00
Roland Tannous
f416b7aa3d training: restore YAML fallback for trust_remote_code (no UI toggle) 2026-03-09 13:10:24 +00:00
imagineer99
0dc3f003cc style: remove playground sidebar right border 2026-03-09 13:08:59 +00:00
Roland Tannous
83b1ff05ef respect trust_remote_code toggle, return helpful error when required 2026-03-09 13:06:55 +00:00
Shine1i
9e96f51e09 feat(studio): add support for code block actions including copy and download options in markdown blocks 2026-03-09 13:07:54 +01:00
Roland Tannous
5ebd4de2ef backend: resolve trust_remote_code from YAML when not set by frontend 2026-03-09 11:58:23 +00:00
imagineer99
812f35bae5 style: improve navbar spacing and icon rendering 2026-03-09 11:37:19 +00:00
Roland Tannous
5dde074af8 add trust_remote_code to BackendTrainingDefaults type 2026-03-09 10:51:28 +00:00
Roland Tannous
4f5c998097 wire trust_remote_code from YAML configs to frontend toggles 2026-03-09 10:15:15 +00:00
Roland Tannous
cb741f8232 add trust_remote_code defaults to all model configs 2026-03-09 09:54:52 +00:00
Roland Tannous
f92316fa7b Merge pull request #329 from unslothai/fix/add-title
modified the title
2026-03-09 13:10:17 +04:00
Manan17
0cc5fe3de8 remove file size limit 2026-03-09 07:04:02 +00:00
Manan17
b8aa528cf3 CLI fix for backend changes 2026-03-09 07:00:06 +00:00
Manan17
b430e23c0e dataset upload 2026-03-09 05:50:18 +00:00
Wasim Yousef Said
39a02602cf Merge pull request #273 from unslothai/feature/data-reciper-enchansments
UX + layout polish & WIP data-reciper client & backend finalization p2
2026-03-09 02:57:32 +01:00
Shine1i
a4d1ab6a32 feat(recipe-studio): enforce run name validation for full runs and refine validation UI 2026-03-09 02:53:59 +01:00
Shine1i
4aa171b079 feat(recipe-studio, datasets): improve dataset handling and update metadata logic 2026-03-09 02:47:32 +01:00
Shine1i
ece5e83d63 feat(recipe-studio, studio): dataset logic, refine run settings, and improve validation UI 2026-03-09 02:06:12 +01:00
samit
1eb68678a0 added auth to audio generate endpoint 2026-03-08 17:46:54 -07:00
Roland Tannous
1b04a40bc8 Merge pull request #328 from unslothai/fix/chat-unloading-model
fixed model unload before load without validation
2026-03-09 04:40:05 +04:00
Shine1i
a11c71f2a0 feat(studio): refine dataset selection logic with Hugging Face and local dataset support 2026-03-09 01:16:45 +01:00
samit
433220d338 Adding trust_remote_code to the orchestrator and worker 2026-03-08 16:44:41 -07:00
Shine1i
d951e5aef0 merge nightly 2026-03-09 00:32:33 +01:00
samit
6aa50d353f exposed trust_remote_code through the UI 2026-03-08 16:28:56 -07:00
Roland Tannous
e4fe027ef7 Merge pull request #320 from unslothai/fix/stale-dataset-split-on-switch
Fix/stale dataset split on switch
2026-03-09 00:14:09 +04:00
Roland Tannous
72ea4c18ef Merge pull request #323 from unslothai/fix/vision-dataset-search-filter
fixing update model type
2026-03-09 00:13:50 +04:00
Roland Tannous
ff828c2d2c Merge pull request #223 from unslothai/feature/support-for-audio-models
Adding support for audio llms
2026-03-09 00:09:59 +04:00
Roland Tannous
bb8a318124 fix: loosen executorch pin for python 3.13 compat 2026-03-08 19:56:09 +00:00
Roland Tannous
c38d24b01d fix: replace is_dataset_multimodal with is_dataset_image/is_dataset_audio in training orchestrator 2026-03-08 19:40:00 +00:00
Roland Tannous
438c83e4e8 silence pip check output 2026-03-08 19:22:31 +00:00
Roland Tannous
3b81ac38e7 make pip check non-fatal for known third-party conflicts 2026-03-08 19:21:28 +00:00
Manan17
111caf636f Audio_VLM bug fix 2026-03-08 19:14:07 +00:00
Roland Tannous
7d23da6877 add extras-no-deps install step for audio model support 2026-03-08 18:49:55 +00:00
imagineer99
568c3cb64c fix: replace favicon with branded sloth icon 2026-03-08 18:46:42 +00:00
Roland Tannous
08a6cf0c87 feat: route audio inference (TTS, ASR, Whisper) through orchestrator/worker subprocess 2026-03-08 18:25:27 +00:00
Roland Tannous
7518b825a7 fix: pin streamdown package versions to avoid type mismatch 2026-03-08 16:29:28 +00:00
Wasim Yousef Said
2fa03b2f7c Merge pull request #308 from unslothai/fix/browser-autofill-hf-token
Prevent browser credential autofill in HF token fields
2026-03-08 16:51:11 +01:00
Wasim Yousef Said
49bcf46cb6 Merge pull request #331 from unslothai/fix/slider-fill-alignment
Align slider fill bar with thumb across value range
2026-03-08 16:50:38 +01:00
Roland Tannous
d846b31dff fix: handle structured audio part type in chat adapter 2026-03-08 14:18:16 +00:00
Roland Tannous
7db2c90cc6 merge nightly into audio branch (mock test) 2026-03-08 10:23:44 +00:00
imagineer99
f249fb3f00 fix: track live slider values for uncontrolled mode and scope fill to horizontal 2026-03-08 10:06:17 +00:00
Manan17
ae828f6142 adding export support 2026-03-08 04:18:20 +00:00
Roland Tannous
c1bed702e6 Merge pull request #318 from unslothai/fix/recharts-dimension-warning
Fix Recharts -1 dimension warning on chart mount
2026-03-08 03:34:58 +04:00
Roland Tannous
b3b8b5b369 Merge pull request #324 from unslothai/feature/subprocess-isolation-version-switching
Subprocess isolation for training, inference, and export with automatic transformers version switching
2026-03-08 03:34:12 +04:00
Roland Tannous
ff85a45050 fix: clear stale model state on failed inference subprocess reload 2026-03-07 23:32:53 +00:00
Roland Tannous
cfad8ec36d fix: reset checkpoint metadata on failed export checkpoint reload 2026-03-07 23:29:34 +00:00
Roland Tannous
58467aac3d fix: validate pip exit codes for .venv_t5 installs in setup.ps1 2026-03-07 23:25:13 +00:00
Roland Tannous
b8577565cd add .venv_t5/ to .gitignore 2026-03-07 23:21:48 +00:00
Manan17
2ce36df03c check fir gated repo 2026-03-07 21:32:50 +00:00
Manan17
4faa6e9152 fixing sesame model 2026-03-07 19:06:00 +00:00
Roland Tannous
9543fa0d1c fix: scope dataloader_num_workers=0 to Windows + transformers 5.x only 2026-03-07 17:55:59 +00:00
Roland Tannous
dcebfe718a fix: prevent training hang on Windows by adding triton-windows support 2026-03-07 17:53:36 +00:00
Roland Tannous
c882a3d2f7 fix: propagate PYTHONPATH to child subprocesses, revert tokenizer patching 2026-03-07 11:28:24 +00:00
Roland Tannous
ac608be800 fix: patch TokenizersBackend in export output after save_pretrained 2026-03-07 10:57:51 +00:00
Roland Tannous
42bd976a2f fix: patch TokenizersBackend by model name - Qwen3.5→Qwen2Tokenizer, GLM→PreTrainedTokenizer 2026-03-07 10:29:59 +00:00
Roland Tannous
44e9b838ae fix: patch Qwen3.5 broken tokenizer_class TokenizersBackend across all backends 2026-03-07 09:43:25 +00:00
Roland Tannous
d5138c529f fix: bump transformers to 5.2.0 and pin huggingface_hub in setup.ps1 2026-03-07 09:12:12 +00:00
Roland Tannous
f101befca7 fix: bump transformers 5.x pin from 5.1.0 to 5.2.0 for Qwen3.5 support 2026-03-07 09:10:09 +00:00
Roland Tannous
2c4c598832 fix: fail fast if runtime pip install of transformers 5.x fails 2026-03-07 08:40:25 +00:00
Roland Tannous
082a6f876e fix: join prior pump thread before starting new training job 2026-03-07 08:37:03 +00:00
Roland Tannous
48456070a7 fix: correct project root depth in model_config.py vision check 2026-03-07 08:15:29 +00:00
Roland Tannous
717d5d621d fix: drain stale events from resp_queue after generation cancel 2026-03-07 08:12:16 +00:00
samit
51f5b56f1c modified the title 2026-03-06 22:33:30 -08:00
Samit
7ec41afaf0 fixed model unload before load 2026-03-06 22:01:27 -08:00
Roland Tannous
ad6739be7a fix: wait for training shutdown before export load, clear stop flag on reset
1. Export route: stop_training() only signals the subprocess — wait up to
   30s for it to actually exit before loading the export checkpoint, avoiding
   a GPU memory race.

2. Training reset: clear _should_stop so /api/train/status returns phase=idle
   instead of staying stuck on phase=stopped after a user-triggered stop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:16:10 +00:00
Roland Tannous
08032e35a7 fix: add /v1 proxy entry to vite dev server config
Without this, /v1/chat/completions requests in local dev are served by
Vite instead of being proxied to the FastAPI backend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:09:28 +00:00
Roland Tannous
2558125a14 fix: serialize generation with _gen_lock to prevent concurrent queue readers
Two overlapping /chat/completions requests could both read from the shared
resp_queue, consuming and dropping each other's token events. Replace the
request_id filtering (which silently dropped non-matching messages) with a
threading.Lock that serializes generation — correct for single-GPU inference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 04:06:51 +00:00
Roland Tannous
cac409198f fix: log final GGUF file locations after relocation 2026-03-06 18:04:27 +00:00
Roland Tannous
e72293a033 fix: increase export timeout to 1 hour for large model GGUF conversion 2026-03-06 17:59:42 +00:00
Roland Tannous
2cfcaa8b61 feat: broaden Qwen3.5 matching to cover entire family 2026-03-06 16:48:28 +00:00
Roland Tannous
c31e8a6ed7 feat: add Qwen3.5-35B-A3B and Qwen3-Next to transformers 5.x model list 2026-03-06 10:54:48 +00:00
Manan17
8afaf55eb5 derive effective model type from isVisionModel for dataset search filterin 2026-03-06 08:47:56 +00:00
Shine1i
72468a3292 feat(recipe-studio, validators): tweak OXC validator with lint suppression support and improve error normalization logic 2026-03-06 09:40:53 +01:00
Roland Tannous
527db4ffff feat: add OpenAI-compatible /v1/chat/completions endpoint 2026-03-06 07:48:09 +00:00
Manan17
fcd52d9bd0 fixing update model type 2026-03-06 07:44:57 +00:00
imagineer99
e0e4619ee2 fix: harden chart container sizing with legacy event rechecks 2026-03-06 07:16:36 +00:00
Roland Tannous
7e59440029 fix: pin huggingface_hub==1.3.0 in .venv_t5 (satisfies transformers 5.x) 2026-03-06 06:19:28 +00:00
imagineer99
e231f366ea fix: preserve chart sizing updates without ResizeObserver 2026-03-06 06:06:50 +00:00
Roland Tannous
c82e3d86bb fix: unload competing subprocesses before load across all routes 2026-03-06 06:05:31 +00:00
Roland Tannous
661ac4be96 feat: subprocess-based export, pin huggingface_hub==0.36.0 2026-03-06 06:03:09 +00:00
imagineer99
6f13185379 fix: align slider fill bar with thumb across value range 2026-03-06 05:21:44 +00:00
Roland Tannous
f15970c02a fix: use subprocess with transformers 5.x for vision detection
Models like GLM-4.7-Flash have architectures (glm4_moe_lite) that
AutoConfig in the main process (transformers 4.57.x) can't recognize.
Instead of a raw config.json workaround, run the AutoConfig check in
a subprocess with .venv_t5/ activated — same pattern as training and
inference workers. This is more robust and consistent.
2026-03-06 04:51:23 +00:00
Roland Tannous
67121ce427 fix: handle unrecognized model architectures in vision detection
AutoConfig.from_pretrained() fails for models needing transformers 5.x
(e.g. glm4_moe_lite) when running with 4.57.x. Add a raw config.json
fallback that bypasses AutoConfig's architecture registry — fetches
config.json directly from local path or HuggingFace Hub and checks
for vision indicators without needing the architecture to be registered.
2026-03-06 04:46:51 +00:00
Roland Tannous
d55e9abcca refactor: consolidate version switching to .venv_t5, remove .venv_overlay
All version switching now uses .venv_t5/ (pre-installed by setup.sh).
The old .venv_overlay/ with runtime pip installs is removed.
ensure_transformers_version() (used only by export) now does a
lightweight sys.path swap instead of pip installing at runtime.
2026-03-06 04:37:06 +00:00
Manan17
cf9eaa2add Fixing dataset split issues 2026-03-06 01:13:55 +00:00
Shine1i
4bd7eca3f3 feat(recipe-studio, validators): extend OXC validator with code shape support and integrate into recipe studio 2026-03-06 02:04:05 +01:00
Shine1i
769515cb5f feat(recipe-studio): add inference_timeout configuration and validation logic 2026-03-06 00:51:28 +01:00
Shine1i
5c33886cce feat(recipe-studio): add support for inference_extra_body configuration with collapsible UI and enhanced validation logic 2026-03-05 23:33:48 +01:00
Roland Tannous
ce9bfd7476 fix: unload inference model before training to free GPU memory
When starting training, shut down the inference subprocess first
so the training subprocess has full GPU memory available.
2026-03-05 22:28:11 +00:00
imagineer99
4c634c4d2a fix: guard recharts ResponsiveContainer behind measured container dimensions 2026-03-05 21:54:27 +00:00
Roland Tannous
e866d16787 fix: indentation error in orchestrator load_model 2026-03-05 19:43:30 +00:00
Shine1i
d687ca6437 feat(data-recipes, validators): extend OXC validator with linting mode support and integrate new modes into recipe studio 2026-03-05 20:19:31 +01:00
Roland Tannous
b598cf0c14 fix: always spawn fresh subprocess per model load
Reusing a subprocess after unsloth patches torch internals causes
inspect.getsource() failures when loading a different model type.
Each load now gets a clean Python interpreter.
2026-03-05 19:15:37 +00:00
Roland Tannous
5c3efd610f fix: use mp.Event for instant cross-process generation cancel
Replaces cmd_queue-based cancel polling with a shared mp.Event.
Fixes two issues:
- Loading a new model while generating no longer hangs (cancel is instant)
- Subprocess shuts down cleanly after explicit stop generation
2026-03-05 18:54:17 +00:00
Shine1i
f9eabf285d feat(data-recipes, validators): add OXC validator runtime and integration with recipe studio 2026-03-05 19:48:26 +01:00
Roland Tannous
b70faf8cb7 feat: subprocess-based inference for transformers version switching
Inference now runs in a persistent subprocess, solving the same
transformers version-switching problem that was fixed for training.
The subprocess stays alive between requests (model in GPU memory)
and is only restarted when switching transformers versions.

New files:
- core/inference/worker.py: subprocess entry point with command loop
- core/inference/orchestrator.py: parent-side proxy with same API

Modified:
- core/inference/__init__.py: exports orchestrator as default backend
- routes/inference.py: removed in-process ensure_transformers_version()
2026-03-05 17:47:57 +00:00
Roland Tannous
021c3aafdd fix: handle None job_id before first training run 2026-03-05 16:59:37 +00:00
Roland Tannous
36b5c6af88 fix: lazy imports in core/__init__ to prevent subprocess importing ML libs early 2026-03-05 16:56:45 +00:00
Roland Tannous
794b8fe866 fix: exclude bitsandbytes from module purge to prevent duplicate operator registration 2026-03-05 16:40:20 +00:00
Roland Tannous
06fbeb22cf fix: remove in-process version switching from models routes 2026-03-05 16:22:32 +00:00
Roland Tannous
fb29d7f999 fix: remove UnslothTrainer/get_trainer from core __init__ exports 2026-03-05 15:57:07 +00:00
Roland Tannous
f90af41c5f feat: subprocess-based training for transformers version switching 2026-03-05 15:40:32 +00:00
Shine1i
6fc829e3ef merge: nightly into feature/data-reciper-enchansments 2026-03-05 14:51:08 +01:00
Shine1i
3ff0e74216 feat(recipe-studio): runtime edge handling with template refs and reversed edge support 2026-03-05 14:46:48 +01:00
Shine1i
b54238bbf5 refactor(studio): replace inputValue with searchQuery for improved clarity, add input reason tracking, and streamline dataset filtering logic 2026-03-05 14:06:17 +01:00
Shine1i
5674c6a815 feat(recipe-studio): improve tab switch fit logic with animation and delay support 2026-03-05 13:29:38 +01:00
Shine1i
2ff1d4de36 feat(recipe-studio): normalize and slugify run_name, update job naming logic 2026-03-05 12:25:51 +01:00
Shine1i
f988202290 refactor(studio): add local data-recipe dataset selection + training wiring 2026-03-05 12:25:51 +01:00
Shine1i
59995d8447 feat(data-recipes, recipe-studio): refactor and enhance recipe templates with updated model configurations, structure changes, and added validation logic 2026-03-05 12:14:01 +01:00
Shine1i
015e93491f feat(recipe-studio): persist advanced collapsible states across components and sessions 2026-03-05 11:56:40 +01:00
Shine1i
e50b2345fd feat(data-recipes, recipe-studio): recipies changes, image context selector 2026-03-05 11:46:42 +01:00
Shine1i
b43e9033fd feat(data-recipes): update recipe templates 2026-03-05 11:29:20 +01:00
Manan17
5d1a162ddd remove tracked OuteTTS embedded repo reference 2026-03-05 08:44:23 +00:00
Manan17
8203637d89 resolved merge conflicts 2026-03-05 07:59:43 +00:00
Manan17
2fa933640e fix SNAC training crash on variable-length sequences with DataCollatorForSeq2Seq 2026-03-05 07:04:53 +00:00
Roland Tannous
f57664e268 Merge nightly into feature/transformers-v5-support 2026-03-05 06:49:44 +00:00
Roland Tannous
37bff450d5 Merge pull request #314 from unslothai/fix/vlm-dataset-conversion-error-handling-local
Fix VLM training abort on URL-based dataset conversion failure
2026-03-05 10:10:58 +04:00
Roland Tannous
a1706c894f fix: check for http(s) prefix instead of bare string type for URL detection 2026-03-05 06:10:10 +00:00
Roland Tannous
2116cc5cca fix: remove benchmark scripts from git tracking
These are standalone benchmark scripts that were force-added despite being
gitignored. They have no test functions and run network calls at module
level, which breaks pytest collection in CI.
2026-03-05 06:06:47 +00:00
imagineer99
ebb57c765d feat(data-recipes): add OCR learning recipe template 2026-03-05 00:58:29 +00:00
Roland Tannous
9907afac9f Merge pull request #313 from unslothai/feature/index-range-dataset-slicing
Fix: clear dataset slice state on file upload
2026-03-05 03:48:10 +04:00
Roland Tannous
b38df21bb5 fix: clear dataset slice state when switching to uploaded file
Prevents stale slice values from silently truncating uploaded datasets.
2026-03-04 23:42:23 +00:00
Roland Tannous
e04b9d53d6 feat: parallel URL image probe with time estimate and progress reporting
- Add 200-sample parallel probe using ThreadPoolExecutor + safe_num_proc
  to estimate download speed and failure rate before full conversion
- Abort with clear error if >=30% of probe images fail to download
- Show estimated download time in the training overlay modal
- Parallel batch conversion for URL-based datasets (vs sequential for local)
- Add warning field to /check-format response for URL-based image datasets
- Display URL warning in dataset preview dialog (amber banner)
- Thread progress_callback from trainer through format_and_template_dataset
  to convert_to_vlm_format for real-time status updates
2026-03-04 23:40:38 +00:00
Roland Tannous
db30b4105f test: add parallel download benchmark with ThreadPoolExecutor 2026-03-04 23:29:43 +00:00
Roland Tannous
1f03754c95 feat: add tqdm progress bar to VLM conversion and download benchmark test 2026-03-04 23:29:43 +00:00
Roland Tannous
63f723cc36 fix: add early probe to fail fast on datasets with too many broken image URLs 2026-03-04 23:29:43 +00:00
Roland Tannous
9487d17b94 fix: use fsspec for URL image downloads with per-sample error handling 2026-03-04 23:29:43 +00:00
Roland Tannous
e6eea64df5 test: add URL image loading comparison script 2026-03-04 23:29:43 +00:00
Roland Tannous
b376c54c21 fix: abort training pipeline on dataset conversion failure 2026-03-04 23:29:43 +00:00
Roland Tannous
bc244aeb23 fix: cast URL image columns to HF Image() type in VLM conversion 2026-03-04 23:29:43 +00:00
Roland Tannous
70434210c7 Merge pull request #312 from unslothai/feature/index-range-dataset-slicing
Add index range dataset slicing to Studio training page
2026-03-05 03:25:21 +04:00
Roland Tannous
945cfa9460 fix: remove unnecessary tooltip copy from train split start 2026-03-04 23:24:09 +00:00
Roland Tannous
263cd19c44 refactor: move train split slice controls back to Advanced section
Place Train Split Start / End inputs inside the Advanced collapsible
with descriptive tooltips clarifying they slice the training split.
Revert the selectors component to its original eval-split-only layout.
2026-03-04 23:24:09 +00:00
Roland Tannous
44905e9216 refactor: move index range fields next to eval split in 3-col grid
Place Slice Start and Slice End inputs alongside the Eval Split
selector in a single row (grid-cols-3) so the dataset card stays
compact. Remove the duplicate controls from the Advanced section.
2026-03-04 23:24:09 +00:00
Roland Tannous
64889cd5fc feat: add index range dataset slicing to studio training page
Add Start/End index inputs under Advanced in the dataset card,
allowing users to slice a dataset by row range before training.
Wired end-to-end: frontend store, API payload, backend Pydantic
model, and trainer dataset loading (inclusive on both ends).
2026-03-04 23:24:09 +00:00
Roland Tannous
52913a4c69 Merge pull request #311 from unslothai/revert-310-feature/index-range-dataset-slicing
Revert "Add index range dataset slicing to Studio training page"
2026-03-05 03:23:31 +04:00
Roland Tannous
9333f99dd3 Revert "Add index range dataset slicing to Studio training page" 2026-03-05 03:21:07 +04:00
Roland Tannous
40113f2f9c Merge pull request #310 from unslothai/feature/index-range-dataset-slicing
Add index range dataset slicing to Studio training page
2026-03-05 03:20:31 +04:00
Roland Tannous
43feb6c2e2 fix: remove unnecessary tooltip copy from train split start 2026-03-04 23:15:49 +00:00
Roland Tannous
ed702b4850 refactor: move train split slice controls back to Advanced section
Place Train Split Start / End inputs inside the Advanced collapsible
with descriptive tooltips clarifying they slice the training split.
Revert the selectors component to its original eval-split-only layout.
2026-03-04 23:07:36 +00:00
Roland Tannous
8d9f195ec0 refactor: move index range fields next to eval split in 3-col grid
Place Slice Start and Slice End inputs alongside the Eval Split
selector in a single row (grid-cols-3) so the dataset card stays
compact. Remove the duplicate controls from the Advanced section.
2026-03-04 22:35:17 +00:00
Roland Tannous
02b17ec6d9 feat: add index range dataset slicing to studio training page
Add Start/End index inputs under Advanced in the dataset card,
allowing users to slice a dataset by row range before training.
Wired end-to-end: frontend store, API payload, backend Pydantic
model, and trainer dataset loading (inclusive on both ends).
2026-03-04 21:48:40 +00:00
Roland Tannous
760f4a3609 test: add parallel download benchmark with ThreadPoolExecutor 2026-03-04 14:30:11 +00:00
Roland Tannous
cc11f066b1 feat: add tqdm progress bar to VLM conversion and download benchmark test 2026-03-04 13:30:27 +00:00
Manan Shah
a8fe6c28a3 Delete studio/TESTING.md 2026-03-04 03:47:19 -07:00
Manan17
ee23628b0c dynamic detection of audio models and fixing autoencoder issues 2026-03-04 10:44:44 +00:00
imagineer99
d0427dc242 fix: prevent browser credential autofill in HF token fields 2026-03-04 08:49:17 +00:00
Roland Tannous
7804a4db2e fix: add early probe to fail fast on datasets with too many broken image URLs 2026-03-04 08:05:40 +00:00
Roland Tannous
9cbd3d44a7 fix: use fsspec for URL image downloads with per-sample error handling 2026-03-04 07:50:55 +00:00
Roland Tannous
060e2e1abf test: add URL image loading comparison script 2026-03-04 07:39:35 +00:00
Roland Tannous
c6d82a6fad fix: abort training pipeline on dataset conversion failure 2026-03-04 06:42:48 +00:00
Roland Tannous
3c4bf80cc2 fix: cast URL image columns to HF Image() type in VLM conversion 2026-03-04 06:42:37 +00:00
Roland Tannous
aa921dee76 Merge pull request #305 from unslothai/fix/dropdown-layout-shift
Prevent select dropdowns from shifting layout when opened
2026-03-04 10:19:27 +04:00
Roland Tannous
874e321fdf Merge pull request #306 from unslothai/fix/hf-dataset-error-message
Sanitize dataset script errors and persist training start error
2026-03-04 10:14:26 +04:00
Roland Tannous
84ad61bfa2 Remove overly broad .py check from dataset error normalization 2026-03-04 06:13:47 +00:00
Roland Tannous
14a8fbc650 Merge pull request #287 from unslothai/fix/duplicate-def-inference
Deleted duplicate definitions for load_for_eval, load_adapter, and load_model_simple in core Inference
2026-03-04 10:06:04 +04:00
Roland Tannous
e8dfa8446d Merge pull request #289 from unslothai/fix/datasets-auth
Added auth to dataset endpoints
2026-03-04 08:21:42 +04:00
Shine1i
acf7cce4a8 merge: nightly into feature/data-reciper-enchansments
resolve setup.sh conflict by keeping nightly installer flow and preserving local data-designer plugin install via install_python_stack.py
2026-03-03 22:21:04 +01:00
Shine1i
ff8269992c feat(recipe-studio): enhance edge synchronization logic with layout direction support 2026-03-03 22:17:50 +01:00
Shine1i
582c09c1f4 feat(recipe-studio): add support for naming full runs, enhance empty states, and refine UI components 2026-03-03 21:56:37 +01:00
Shine1i
e38911709f feat(recipe-studio): add authentication to API requests and backend routes 2026-03-03 21:32:39 +01:00
imagineer99
7bc5bc26f6 fix: sanitize dataset script errors and persist training start error 2026-03-03 20:15:23 +00:00
Shine1i
3c88712519 refactor(recipe-studio): update UI components with consistent styling and improved hierarchy 2026-03-03 21:02:57 +01:00
Roland Tannous
9dbee02417 Updated README 2026-03-03 18:42:35 +00:00
imagineer99
981b618c1c fix: prevent select scroll-lock margin from shifting layout 2026-03-03 18:37:46 +00:00
Roland Tannous
c89c3e79be Merge pull request #296 from unslothai/feature/windows-native-support
PR: Windows Native Support + llama.cpp Build Migration
2026-03-03 22:23:35 +04:00
Roland Tannous
0b4f6a1343 Merge branch 'nightly' into feature/windows-native-support 2026-03-03 22:23:18 +04:00
Roland Tannous
8c333e2b81 chore: add cross-platform Python installer with updated unsloth patch URLs 2026-03-03 17:31:59 +00:00
Roland Tannous
5f98d232d0 fix: align llama-server binary discovery with upstream unsloth-zoo paths 2026-03-03 17:03:01 +00:00
Shine1i
b055713e99 feat(recipe-studio): add HF repo ID inference and reset logic for HF state 2026-03-03 11:37:49 +01:00
Shine1i
e2292df7da refactor(seed): package unstructured seed reader as local Data Designer plugin 2026-03-03 11:22:04 +01:00
Shine1i
a2b61fa762 merge nightly into feature/data-reciper-enchansments 2026-03-03 11:14:18 +01:00
Shine1i
4c5a2543c3 feat(seed): backend unstructured seed reader + server-side chunking, remove client chunk splitter 2026-03-03 11:11:26 +01:00
Roland Tannous
b269f722f9 Merge pull request #297 from unslothai/fix/fix-pip-issues
fix: make pip check non-fatal and install jedi for Colab compatibility
2026-03-03 13:35:29 +04:00
Manan17
6fd1dd2c0a variable changes and some cleanup 2026-03-03 09:35:11 +00:00
Roland Tannous
fe87826d1f fix: make pip check non-fatal and install jedi for Colab compatibility 2026-03-03 09:34:35 +00:00
Shine1i
f481fda6ae feat(recipe-studio): add execution progress island and collapsible advanced options for validators 2026-03-03 10:34:32 +01:00
Roland Tannous
da00f5ed1d Merge branch 'nightly' into feature/support-for-audio-models 2026-03-02 15:55:25 +04:00
Roland Tannous
7f339b5c97 Patch unsloth-zoo llama_cpp.py and unsloth save.py from windows-support branch 2026-03-02 10:45:09 +00:00
Roland Tannous
e7619a1291 Move llama.cpp clone/build from in-tree to ~/.unsloth/llama.cpp
- setup.sh: builds at ~/.unsloth/llama.cpp instead of ./llama.cpp
- setup.ps1: builds at %USERPROFILE%/.unsloth/llama.cpp
- inference llama_cpp.py: searches ~/.unsloth/ first, in-tree as legacy
- export.py: updated comments (unsloth-zoo handles path natively)
2026-03-02 04:04:41 +00:00
Wasim Yousef Said
e5b69b7063 Merge pull request #294 from unslothai/fix/navbar-center-tabs-shift
Prevent navbar tab shift when navigating across pages
2026-03-01 15:42:19 +01:00
Wasim Yousef Said
15d1e5c457 Merge pull request #290 from unslothai/fix/model-dropdown-visual-consistency
Standard OOM/TIGHT model status indicators across model dropdowns
2026-03-01 15:41:39 +01:00
Roland Tannous
204123a212 Tighten Python bounds to >= 3.11, < 3.14 (matching setup.sh), only auto-install if missing 2026-03-01 13:05:10 +00:00
Roland Tannous
33be2ac093 Add Python 3.12 prerequisite check with auto-install via winget 2026-03-01 13:05:10 +00:00
Roland Tannous
148e93cb83 Auto-enable Windows Long Paths via UAC elevation during setup 2026-03-01 13:05:10 +00:00
Roland Tannous
77d1378d04 Remove unused CMP0194 cmake policy (eliminates cmake warning) 2026-03-01 13:05:10 +00:00
Roland Tannous
6d606cd18c Simplify: use winget OpenSSL.Dev instead of vcpkg for HTTPS support 2026-03-01 13:05:10 +00:00
Roland Tannous
2a9aba5017 Add vcpkg/curl[ssl] for HTTPS support in llama-server, enable LLAMA_CURL=ON 2026-03-01 13:05:10 +00:00
Roland Tannous
70d1567fe3 Download GGUF via huggingface_hub instead of llama-server -hf (fixes HTTPS not supported on Windows) 2026-03-01 13:05:10 +00:00
Roland Tannous
2a5e03945f Add .venv/Scripts to User PATH so unsloth-studio works without activation 2026-03-01 13:05:10 +00:00
Roland Tannous
9b6a928a78 Simplify completion banner: no venv activation needed 2026-03-01 13:05:10 +00:00
Roland Tannous
0430d22cc2 Auto-add CUDA DLLs to PATH when launching llama-server on Windows 2026-03-01 13:05:10 +00:00
Roland Tannous
e956fb4106 Warn user to uninstall incompatible CUDA toolkit instead of failed side-by-side 2026-03-01 13:05:10 +00:00
Roland Tannous
c182b8c438 Fallback: try descending CUDA versions if exact driver-max install fails 2026-03-01 13:05:10 +00:00
Roland Tannous
d965a51b70 Always persist compatible CUDA_PATH to User registry (overwrite stale values) 2026-03-01 13:05:10 +00:00
Roland Tannous
f80cef3abe Fix: scan side-by-side CUDA installs, pick compatible toolkit version 2026-03-01 13:05:10 +00:00
Roland Tannous
afa1344452 Build llama.cpp in-tree, auto-detect driver CUDA version for compatible toolkit 2026-03-01 13:05:10 +00:00
Roland Tannous
7377c92a4c Auto-detect driver CUDA version, install compatible toolkit instead of latest 2026-03-01 13:05:10 +00:00
Roland Tannous
18134ee808 Fix non-ASCII chars in test script for Windows PS 5.1 2026-03-01 13:05:10 +00:00
Roland Tannous
4ee5ada609 Add llama-cpp Windows test script, fix binary lookup paths 2026-03-01 13:05:10 +00:00
Roland Tannous
af90c9c3d2 Fix llama-server binary lookup for Windows (.exe, Release dir, ~/.unsloth) 2026-03-01 13:05:10 +00:00
Roland Tannous
c297d7aa84 Force num_proc=1 on Windows to avoid slow spawn overhead 2026-03-01 13:05:10 +00:00
Roland Tannous
602ae716c3 Set short TORCHINDUCTOR_CACHE_DIR to fix Windows MAX_PATH crash 2026-03-01 13:05:10 +00:00
Roland Tannous
c7fed1ba83 Fix npm Invalid Version: delete package-lock.json, relax Node constraint 2026-03-01 13:05:10 +00:00
Roland Tannous
e6e97ad4c1 Enforce Node LTS (v20-v22), add npm error checking, clean node_modules 2026-03-01 13:05:10 +00:00
Roland Tannous
721088047c Fix npm stderr crash on Windows ErrorActionPreference 2026-03-01 13:05:10 +00:00
Roland Tannous
ccfc00944f Fix Windows frontend build, add setup.bat, ANSI colors, aliases 2026-03-01 13:05:10 +00:00
Roland Tannous
9dc7af08a0 add setup.bat 2026-03-01 13:05:10 +00:00
Roland Tannous
26996bc609 Extract shared install_python_stack.py for cross-platform setup 2026-03-01 13:05:10 +00:00
Roland Tannous
46641bb872 Merge pull request #295 from unslothai/fix/fix-local-vision-gguf-loading
fix: support mmproj for local vision GGUF models + fix Windows pipe d…
2026-03-01 17:03:24 +04:00
Roland Tannous
986bef4f99 fix: support mmproj for local vision GGUF models + fix Windows pipe deadlock 2026-03-01 12:58:38 +00:00
Shine1i
4780d0747d feat(recipe-studio): introduce validator blocks for code validation with Python and SQL engines 2026-03-01 13:01:00 +01:00
Shine1i
899350d3e8 feat(recipe-studio): add LLM trace modes and reasoning content extraction support 2026-03-01 12:01:48 +01:00
Shine1i
653b85a07e refactor(recipe-studio): add image preview support for dataset and LLM configurations p2 2026-03-01 11:21:10 +01:00
Shine1i
ac1c43ec77 feat(recipe-studio): add image preview support for dataset and LLM configurations p1 2026-03-01 10:57:51 +01:00
Shine1i
b56f6100c7 feat(recipe-studio): auto-fit editor viewport on tab switch, track manual viewport adjustments 2026-03-01 10:21:02 +01:00
Manan17
8cdeb006b6 code cleanup 2026-03-01 08:04:38 +00:00
imagineer99
95ef5b348a fix: prevent navbar tab shift when navigating across pages 2026-03-01 03:02:49 +00:00
Manan17
9e89f31bc7 revamping up the code and adding inference 2026-03-01 02:30:31 +00:00
Manan17
90332924de Changes with audio training 2026-03-01 02:27:45 +00:00
Manan17
2c5621dd8c merging with nightly 2026-03-01 02:27:45 +00:00
imagineer99
03f8411d12 fix: standardize OOM/TIGHT model status indicators across model dropdowns 2026-03-01 00:02:15 +00:00
samit
39a2fef4d9 updated fetch to auth fetch in the frontend 2026-02-28 02:10:12 -08:00
samit
2714789381 added auth to dataset endpopints 2026-02-28 01:17:43 -08:00
Shine1i
50385c1eae feat(markdown): fix Mermaid integration with error handling and copy button 2026-02-27 20:02:40 +01:00
samit
46b1a78e52 deleted duplicate definitions 2026-02-27 06:00:28 -08:00
Roland Tannous
ed97809873 Merge pull request #284 from unslothai/fix/drop-model-task-hard-filter
Apply HF task filtering only for empty model queries
2026-02-27 15:46:17 +04:00
imagineer99
7682760581 fix: only apply HF task filter for empty model search queries 2026-02-27 11:31:53 +00:00
Wasim Yousef Said
d90ada2af2 Merge pull request #268 from unslothai/fix/delete-custom-config
Updated the delete custom preset in chat tab (filters)
2026-02-27 01:38:01 -08:00
Shine1i
c24bd48deb keep checkpoint on preset apply 2026-02-27 10:36:07 +01:00
Wasim Yousef Said
673f951234 Merge pull request #269 from unslothai/fix/fine-tuned-model-tooltip
Added tooltip for the fine tuned models in chat page
2026-02-27 01:34:49 -08:00
Wasim Yousef Said
e9d4e2871d Merge pull request #262 from unslothai/fix/truncated-text
Reduced name truncation on the training page
2026-02-27 01:33:05 -08:00
Shine1i
e8f832710c merge nightly 2026-02-27 10:31:37 +01:00
Roland Tannous
d0231abfea Merge pull request #267 from unslothai/fix/config-switch
Preserving model name during configuration type switch in chat page
2026-02-27 13:23:29 +04:00
Roland Tannous
f6bb12ccc1 Merge pull request #266 from unslothai/fix/dataset-search-remove-size-download-badges
Remove dataset metadata badges from HF dataset dropdowns
2026-02-27 13:22:49 +04:00
Roland Tannous
d6922f5e83 Merge pull request #282 from unslothai/fix/inference-auth
Added auth to inference endpoints
2026-02-27 13:18:38 +04:00
Roland Tannous
e51ec8a30a Merge pull request #278 from unslothai/fix/reorder-model-type-cards-onboarding
Reorder model type cards in onboarding to show Text first
2026-02-27 13:17:00 +04:00
Roland Tannous
c45fd1b0a9 Merge pull request #275 from unslothai/fix/show-size-gguf
Passes metadata to get model size
2026-02-27 13:15:38 +04:00
Manan17
b4311cca82 Aggregating sharded models, showing fit/oom for quantizations 2026-02-27 08:23:15 +00:00
samit
6a9969d67b added auth to inference endpoints 2026-02-27 00:20:36 -08:00
Manan17
4bd5213c05 Passes metadata to get model size 2026-02-27 07:38:55 +00:00
Roland Tannous
bbf1b9ab59 Merge pull request #276 from unslothai/fix/rebuild-llamacpp-setup
rebuild llama cpp for setup
2026-02-27 10:20:32 +04:00
imagineer99
9befc653ac fix: reorder model type cards in onboarding to show Text first 2026-02-27 06:16:26 +00:00
Manan17
021c09e3ac rebuild llama cpp for setup 2026-02-27 04:35:52 +00:00
Shine1i
3487e36571 refactor(recipe-studio): split page logic into graph/runtime hooks + floating run controls 2026-02-26 16:42:35 +01:00
Roland Tannous
6c5763e0ce Merge branch 'nightly' 2026-02-26 19:38:49 +04:00
Shine1i
46dda064ad fix(recipe-studio): prevent stale empty fitView from offsetting first block zoom 2026-02-26 16:23:27 +01:00
Shine1i
2b2e870862 refactor(recipe-studio): simplify runtime graph flow + guard stale active execution lock p2 2026-02-26 15:37:48 +01:00
Shine1i
d356ded63a feat(recipe-studio): add live execution graph state (active flows, node status, editor lock) p1 2026-02-26 15:27:46 +01:00
Shine1i
49953c849e fix(recipe-studio): support user.* refs validation + toggle user badge details; style user refs/node amber 2026-02-26 14:27:36 +01:00
Wasim Yousef Said
d9de1aaf1b Merge pull request #272 from unslothai/feature/data-reciper-enchansments
feat(recipe-studio): UX + layout polish & WIP data-reciper client & backend finalization p1
2026-02-26 05:10:37 -08:00
Shine1i
46046cd118 refactor(data-recipe): centralize json+stage constants, tighten parser/errors, sync seed ui 2026-02-26 14:06:53 +01:00
Shine1i
3a7c7bcdf5 refactor(data-recipe): split recipe backend routes for readability (seed/validate/jobs) 2026-02-26 14:05:32 +01:00
Shine1i
c0165a1d83 feat(recipe-studio): add jinja ref validation UI for llm/expression fields 2026-02-26 13:35:07 +01:00
Shine1i
a472c6ee5b feat(recipe-studio): add block sheet search + clearer icons in sheet 2026-02-26 12:55:09 +01:00
Shine1i
039eeadac4 chore: simplify recipe drag payload parsing 2026-02-26 12:48:04 +01:00
Shine1i
09b62c7b45 feat(recipe-studio): add sidebar drag-drop block creation + spawn sheet added blocks at viewport center 2026-02-26 12:45:38 +01:00
Shine1i
36e258d82c feat(recipe-studio): sanitize shared seed payload + add inline seed UX with HF search 2026-02-26 12:23:05 +01:00
Shine1i
1757958f3d feat(recipe-studio): polish import/llm editors, refs preview, copy toast, and note layout behavior 2026-02-26 11:44:57 +01:00
Shine1i
540c22a9b2 fix(recipe-studio): preserve note positions during auto-layout and fit workflow only 2026-02-26 11:30:24 +01:00
Shine1i
46445a3dc8 feat(recipe-studio): optimize model infra auto-layout handles and centering 2026-02-26 11:07:07 +01:00
Shine1i
8cdc710275 refactor(recipe-studio): simplify aux node graph logic and remove dead handle/sync code 2026-02-26 10:43:26 +01:00
Shine1i
d895868017 feat(ui): normalize recipe dialogs + chip/category UX polish 2026-02-26 10:13:01 +01:00
Shine1i
6136119dfb fix: recipe studio dialog combobox click-select + simplify model provider form 2026-02-26 10:03:47 +01:00
Roland Tannous
ab948b0d15 Merge pull request #271 from unslothai/fix/setup-python-version-bounds
fix(setup): enforce Python >= 3.11 and < 3.14 version bounds
2026-02-26 12:13:32 +04:00
Roland Tannous
b0972210c4 fix(setup): restrict Python to >=3.11 and <3.14
Adds lower bound (>= 3.11) and tightens upper bound (< 3.14) for
Python version discovery in setup.sh. Extracts bounds into
MIN_PY_MINOR / MAX_PY_MINOR variables for easy future updates.
2026-02-26 11:54:16 +04:00
Roland Tannous
8944d79c61 Merge pull request #270 from unslothai/fix/gguf-export-relocation
Fix GGUF exports saving to wrong directory and missing from chat model selector
2026-02-26 11:48:15 +04:00
Roland Tannous
c06adc3878 Flatten GGUF subdirs in export and fix metadata lookup in scanner 2026-02-26 11:35:04 +04:00
Roland Tannous
a715bca52f Write export metadata for GGUF exports to fix Unknown base model 2026-02-26 11:24:32 +04:00
Roland Tannous
f747646329 Add gguf to toLoraSummary inline type 2026-02-26 10:59:39 +04:00
Roland Tannous
4a0d02273b Revert "Add gguf to frontend export_type unions"
This reverts commit 5b74f505db.
2026-02-26 10:56:26 +04:00
Roland Tannous
5b74f505db Add gguf to frontend export_type unions 2026-02-26 10:54:49 +04:00
Roland Tannous
0d2bda62b2 Merge pull request #229 from unslothai/feat/dataset-list-sorting
Feat: Sort and filter dataset search results by model type relevance
2026-02-26 10:40:02 +04:00
Roland Tannous
c3a0e9e7ad Merge pull request #245 from unslothai/fix/datetime-utc-python39-compatibility
fix: replace datetime.UTC with timezone.utc for Python 3.9+ compatibility
2026-02-26 10:37:01 +04:00
imagineer99
15aebe1e76 feat: added datasets of size 5M and 10M to pretraining size category 2026-02-26 06:32:45 +00:00
imagineer99
48f48afa10 fix: filter OCR datasets from non-vision hub results 2026-02-26 06:27:52 +00:00
Roland Tannous
17d01c6f90 Merge branch 'nightly' 2026-02-26 10:25:41 +04:00
Roland Tannous
1e5503a402 Merge pull request #243 from unslothai/fix/setup-unbound-variable
resolved unbound variable error
2026-02-26 10:18:21 +04:00
samit
aef5186275 updated to make the delete preset work 2026-02-25 21:36:50 -08:00
imagineer99
645ad644dd fix: remove dataset metadata badges from HF dataset dropdowns 2026-02-26 03:57:55 +00:00
samit
7f4ca59a17 passed checkpoint as a parameter to presets 2026-02-25 18:08:02 -08:00
Wasim Yousef Said
a09fbfcd73 Merge pull request #264 from unslothai/fix/attachment-tsx-type-error
fix(attachment): replace never exhaustive check to fix Colab TS2322 b…
2026-02-25 17:19:44 -08:00
Leo Borcherding
babc88fbee fix(attachment): replace never exhaustive check to fix Colab TS2322 build error
`attachment.type` resolves to `string & {}` via @assistant-ui/store@0.1.6's
generic type chain when installed through npm (package-lock.json), breaking
the `const _exhaustiveCheck: never = type` exhaustive check pattern.

Replace with a direct throw that compiles cleanly across library versions
while preserving identical runtime behaviour.

Fixes #263

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-25 17:56:02 -06:00
Roland Tannous
b91b979bf8 Add GGUF tag for exported models in chat page selector 2026-02-25 19:01:47 +04:00
Roland Tannous
f0176c7f0c Relocate GGUF exports into exports/ directory 2026-02-25 18:54:39 +04:00
Roland Tannous
3647e738c6 Fix GGUF models missing from chat page model search
GGUF was in the global EXCLUDED_TAGS set which filtered it from all
consumers of useHfModelSearch, including the chat page. Move GGUF
exclusion to an opt-in excludeGguf option so only training and
onboarding pages filter out GGUF models.
2026-02-25 16:21:08 +04:00
Roland Tannous
c5f0da7873 Merge pull request #261 from unslothai/feat/gguf-llama-cpp-inference
Add GGUF model inference via llama-server with quantization variant selection
2026-02-25 16:07:39 +04:00
Roland Tannous
efaa0bacfb Merge branch 'nightly' into feat/gguf-llama-cpp-inference 2026-02-25 16:06:03 +04:00
Roland Tannous
52738383f9 Remove UNSLOTH_ENABLE_LOGGING from export pipeline 2026-02-25 16:00:24 +04:00
Roland Tannous
5c3a01899c Filter GGUF models from training page model selectors
GGUF models can't be fine-tuned, so hide them from the training/studio
page while keeping them available for inference on the chat page.

- Add "gguf" to EXCLUDED_TAGS in HF model search hook
- Filter local models with .gguf extension or -GGUF in ID
2026-02-25 15:47:45 +04:00
samit
c1f043a3b0 reduced broad padding 2026-02-25 03:44:05 -08:00
samit
4ff7e141fe added space to show model/dataset name 2026-02-25 03:40:44 -08:00
Roland Tannous
b0533503f2 added vision.py patch for vision processor from PR#260 2026-02-25 11:39:17 +00:00
Roland Tannous
b1f918a75e Merge pull request #249 from unslothai/fix/section-card-corner-bleed
Fix: Clip section card overflow to prevent background bleed
2026-02-25 15:27:46 +04:00
Roland Tannous
4809b8283a Merge pull request #259 from unslothai/feat/dataset-subsets-split
Feat/dataset subsets split
2026-02-25 15:27:12 +04:00
Roland Tannous
e52010635b Merge pull request #246 from unslothai/fix/dataset-custom-mapping-heuristic
adding custom mapping according to the chat templates
2026-02-25 15:26:36 +04:00
Roland Tannous
71a1a347b0 Merge pull request #260 from unslothai/fix/fix-vision-processor-unsloth-bug
fix: correct vision.py patch path to unsloth/models/vision.py + add V…
2026-02-25 15:21:01 +04:00
Shine1i
94655ad61e style(studio): align card heights and restore dataset advanced section placement 2026-02-25 12:11:06 +01:00
Roland Tannous
f47257dd15 fix: correct vision.py patch path to unsloth/models/vision.py + add VLM processor diagnostic 2026-02-25 11:06:22 +00:00
Roland Tannous
d9434fee4a fix: use raw github URL for vision.py patch + add VLM processor diagnostic logging 2026-02-25 10:29:05 +00:00
Shine1i
84ac1fc3be chore: add tour label next to navbar tour icon 2026-02-25 11:23:43 +01:00
Manan17
5ce88f9aa1 fixing the chatml None error 2026-02-25 10:23:13 +00:00
Shine1i
e52e8a6d51 fix recipe output path, remove tracked root datasets 2026-02-25 11:19:10 +01:00
Wasim Yousef Said
cdfb790ab7 Merge pull request #257 from unslothai/feature/chat-model-switch-warning
feat: chat model switching toast and add image detection logic
2026-02-25 01:58:56 -08:00
Shine1i
de65eafbb8 feat: chat model switching toast and add image detection logic 2026-02-25 10:55:53 +01:00
Wasim Yousef Said
d82f03a5d0 Merge pull request #254 from unslothai/feature/theme-fix
feat: fix markdown rendering, UI adjustments
2026-02-25 00:48:09 -08:00
Shine1i
2226efcd62 feat: fix markdown rendering, UI adjustments 2026-02-25 09:46:13 +01:00
samit
1a90b883b6 rebase with nightly 2026-02-25 00:36:25 -08:00
Wasim Yousef Said
90df7bc897 Merge pull request #253 from unslothai/feature/theme-fix
feat: fix dark mode support and refine UI assets
2026-02-25 00:27:43 -08:00
Shine1i
f285d7e260 feat: fix dark mode support and refine UI assets 2026-02-25 09:23:05 +01:00
Manan17
202dd082b7 My changes for dataset 2026-02-25 08:15:44 +00:00
Manan17
611febd2e3 adding custom mapping according to the chat templates 2026-02-25 07:56:30 +00:00
imagineer99
f166b65cd9 fix: clip section card overflow to prevent background bleed at rounded corners 2026-02-25 03:54:40 +00:00
imagineer99
000f0c8cd3 feat: filter pretraining datasets from search results 2026-02-25 03:00:40 +00:00
Roland Tannous
b442bf1f84 Merge pull request #247 from unslothai/fix/path-traversal-vuln
Fix Content-Length crash and path traversal vulnerability in frontend serving
2026-02-25 05:16:00 +04:00
Roland Tannous
2e06a00934 fix: replace FileResponse with Response for index.html to prevent Content-Length mismatch and add path traversal guard 2026-02-25 01:05:04 +00:00
Roland Tannous
0ccf07a03b Merge pull request #30 from unslothai/feature/canvas-lab
Draft: Data Recipes graph editor WIP
2026-02-25 04:01:53 +04:00
Shine1i
18cdd831cd chore: squircle! tooltip 2026-02-25 00:55:35 +01:00
Shine1i
bbb81a89e0 feat: update icons and enhance dark mode styling for navbar and recipes
- Replaced `CookBookIcon` with `ChefHatIcon` in navbar for improved clarity.
- Added dark mode-specific gradient styles to recipe cards for better visual differentiation.
2026-02-25 00:39:49 +01:00
Shine1i
79ddc863f0 feat: improve dark mode styling and simplify navbar 2026-02-25 00:31:20 +01:00
Roland Tannous
9e280eb105 Fix GGUF export cwd confusion: remove os.chdir, use absolute paths
Remove os.chdir(save_directory) from export.py which was causing all of
unsloth-zoo's relative-path internals (check_llama_cpp, use_local_gguf,
_download_convert_hf_to_gguf) to resolve against the export directory
instead of the repo root. This caused llama.cpp to be cloned inside each
export dir and destroyed the repo root's llama-server build on cleanup.

Now passes absolute paths to save_pretrained_gguf so unsloth resolves
llama.cpp from the repo root where setup.sh already built it.

Also builds llama-quantize in setup.sh (needed by unsloth-zoo's export
pipeline) and symlinks it to llama.cpp root for check_llama_cpp().
2026-02-25 03:30:54 +04:00
Shine1i
e70bb621ec Merge branch 'feature/canvas-lab' of https://github.com/unslothai/new-ui-prototype into feature/canvas-lab
# Conflicts:
#	studio/frontend/bun.lock
2026-02-25 00:19:19 +01:00
Shine1i
5a87ee40aa feat: add animated theme toggler and refine dark mode styling 2026-02-25 00:18:20 +01:00
Manan17
07cf1110ce adding custom mapping according to the chat templates 2026-02-24 21:15:56 +00:00
Leo Borcherding
d05ebc7499 fix: replace datetime.UTC with timezone.utc for Python 3.9+ compatibility
- Replace datetime.UTC with datetime.timezone.utc in authentication.py and storage.py
- Fixes ImportError on Python versions < 3.11
- timezone.utc works on Python 3.9+

Resolves #237
2026-02-24 14:37:00 -06:00
Roland Tannous
2ebeba8588 Switch GGUF backend from /v1/completions to /v1/chat/completions
Fixes two bugs:
1. Chat template tags (<|im_start|>, <|im_end|>) leaking into output
   because /v1/completions treated them as literal text
2. Image hallucination because image_b64 was never passed to llama-server

Now llama-server handles chat templates natively and receives images
as OpenAI-format multimodal content parts for vision models.
2026-02-24 19:21:01 +04:00
Roland Tannous
3ee4f1359a Use llama-server -hf mode, add GGUF variant selector, fix vision detection
Replace Python-side GGUF download with llama-server's native -hf flag for
HuggingFace repos. Add frontend variant picker so users can choose
quantization (Q4_K_M, Q8_0, BF16, etc.) with file sizes. Fix vision
detection via mmproj files instead of hardcoding is_vision=False.
2026-02-24 19:03:06 +04:00
Roland Tannous
5b7555cd3f Fix llama-server: build in-tree, fix path resolution, add LD_LIBRARY_PATH 2026-02-24 18:19:29 +04:00
Roland Tannous
4a82e704aa Preflight llama-server check before downloading remote GGUF files 2026-02-24 18:02:43 +04:00
Roland Tannous
c635d4f49c Fix GGUF detection for HuggingFace repo IDs (not just local paths) 2026-02-24 17:49:09 +04:00
Roland Tannous
eb6e9f7412 Fix CUDA detection for llama-server build on multi-GPU machines 2026-02-24 17:45:17 +04:00
Roland Tannous
2f985ccbb5 Add GGUF model inference via llama-server backend 2026-02-24 17:40:05 +04:00
Roland Tannous
a09823c2eb Merge branch 'nightly' into feature/canvas-lab 2026-02-24 10:08:13 +00:00
Roland Tannous
2513d1b623 Merge pull request #218 from unslothai/fix/stop-startup-modal
Added cancel training button on the overlay
2026-02-24 14:03:25 +04:00
Roland Tannous
f8486672f6 Merge pull request #241 from unslothai/feature/adding-exported-models-for-chat
Adding exported model for chat
2026-02-24 13:55:45 +04:00
Roland Tannous
6677e4fcc2 fix(chat): strip /suffix from lora display name and show type tag instead of base model 2026-02-24 09:54:34 +00:00
Roland Tannous
a661784d41 Merge pull request #232 from unslothai/fix/disable-eval-by-default
# fix/disable eval by default
2026-02-24 13:35:11 +04:00
Roland Tannous
e64bf905e1 use explicit float bounds for eval_steps input (0.0–1.0) 2026-02-24 09:31:30 +00:00
Roland Tannous
a15082acfe skip eval split and HF split detection when eval_steps is disabled 2026-02-24 09:26:54 +00:00
imagineer99
6765b26d73 feat: move cancel training button inside terminal startup card 2026-02-24 09:05:02 +00:00
Roland Tannous
c14becb658 Merge remote-tracking branch 'origin/nightly' into feature/canvas-lab
# Conflicts:
#	studio/frontend/bun.lock
#	studio/frontend/package.json
2026-02-24 09:02:54 +00:00
Roland Tannous
c16b99cb13 Merge pull request #231 from unslothai/feat/custom-YAML-saving
Feat: Add Upload / Save / Reset training config from local YAML
2026-02-24 12:43:42 +04:00
imagineer99
53f7f4f158 feat: improve training config UX and remove unused logging options 2026-02-24 08:22:02 +00:00
Shine1i
a55612d109 chore: remove unused "Evaluate" navigation item and its icon from navbar 2026-02-24 09:09:56 +01:00
Shine1i
ca9992d6f6 feat: introduce single-env Python dependency management for streamlined compatibility
- Added constrained dependency files for single-env installations: `constraints.txt`, `data-designer.txt`, and `data-designer-deps.txt`.
- Implemented a `patch_metadata.py` script to resolve metadata conflicts between dependency versions.
- Updated `setup.sh` to integrate single-env setup, including dependency installation and metadata patching.
- Upgraded `fastmcp` and `websockets` versions in `extras.txt` for compatibility.
- Commented out unused "Start Tutorial" button in `data-recipes-page.tsx`.
2026-02-24 07:45:40 +01:00
Shine1i
0b43f2b87d feat: improve markdown note styles and layout logic 2026-02-24 04:04:02 +01:00
Shine1i
1dd7ae2b2d feat: enhance markdown note blocks with style options and double-click config access
- Added support for configuring markdown note block styles, including color and opacity.
- Enabled double-click on markdown notes to open their configuration dialog.
- Adjusted layout styles in markdown previews for better interaction control.
- Updated relevant payloads, types, and UI logic to support added styling features.
- Integrated multiple example notes in learning recipes for better visualization.
2026-02-24 03:47:42 +01:00
Shine1i
8f6e475145 feat: introduce markdown note blocks for canvas documentation
- Added "Markdown Note" block to allow users to add UI-only markdown notes to the canvas for documentation purposes.
- Integrated note creation, editing, and rendering in the `recipe-studio` UI, including markdown previews.
- Updated payload generation logic to omit markdown notes from backend payloads.
- Enhanced block types, definitions, and dialog support to include the new "Markdown Note" feature.
2026-02-24 03:11:29 +01:00
Shine1i
507e9b0669 feat: add "Multi-Turn Chat" learning recipe with structured conversation outputs
- Introduced "Multi-Turn Chat" recipe to generate structured user-assistant conversations with domain/topic-based goals and constraints.
- Added `conversation.json` with model configuration, sampling strategies, and LLM prompts.
- Updated UI nodes, layout, and graph rendering logic to support new recipe.
- Enhanced `recipe-studio` fit view logic to improve editor layout responsiveness.
2026-02-24 02:38:36 +01:00
samit
5111f0e0dc resolved unbound variable error 2026-02-23 17:37:23 -08:00
Manan17
6fa6b0bf28 Fixing base model export issue for vlms 2026-02-24 01:34:11 +00:00
Manan17
1071c137f4 Adding exported model for chat 2026-02-24 01:17:09 +00:00
Shine1i
e6f6d4c667 feat: add new learning recipes for diverse data transformations
- Added three new learning recipes: "Instruction from Answer," "PDF Grounded QA," and "Structured Outputs Jinja," with respective metadata and configuration.
- Integrated support for unstructured and structured input handling, including sampling strategies, prompt definitions, and model specifications.
- Enhanced JSON structure and UI nodes to facilitate better recipe visualization and execution.
2026-02-24 01:50:55 +01:00
Shine1i
92551c8ce2 feat: add layout direction support and enhance handle logic
- Introduced `layoutDirection` to control graph orientation ("LR" or "TB") and integrate into edges, nodes, and payloads.
- Enhanced handle management with new default, semantic, and data-specific mappings based on layout direction.
- Added handle normalization for consistent connections across layouts and semantic/data flows.
- Updated UI to reflect layout-aware positioning and semantic connections.
2026-02-24 00:51:49 +01:00
Shine1i
d25b922177 feat: normalize handle IDs and enhance scorer options UI
- Added handle normalization functions to standardize handle IDs across connections.
- Expanded UI for scorer options with real-time updates, input fields for values and descriptions, and support for adding/removing options.
- Updated graph node handles and their layout logic for better connection visualization.
- Stripped sensitive fields (e.g., `api_key`) from payloads during export.
2026-02-24 00:29:14 +01:00
Shine1i
de24891de6 feat: add "Instruction from Answer" learning recipe and badge display enhancements
- Introduced a new "Instruction from Answer" learning recipe with related metadata, payload integration, and UI updates.
- Enhanced badge display logic to include up to 3 badges with overflow indication for additional learning badges.
2026-02-24 00:25:21 +01:00
Shine1i
8ea9ac6a21 feat: add per-column seed drop support with UI integration, validation, and payload enhancements 2026-02-23 23:33:59 +01:00
Shine1i
1a7373b99d feat: add support for learning recipes with template loading, dialog integration, and enhanced payload handling 2026-02-23 23:20:32 +01:00
Shine1i
813e2b5bb4 feat: add ShineBorder UI component and learning recipe templates to enhance data recipes page 2026-02-23 22:38:06 +01:00
Shine1i
ad097e359f Merge branch 'nightly' into feature/canvas-lab 2026-02-23 21:54:35 +01:00
Shine1i
ebfee8af86 refactor: keep seed block pos 2026-02-23 21:53:32 +01:00
Shine1i
5937ed76a2 refactor: add batch processing support with configuration options and execution enhancements 2026-02-23 21:32:20 +01:00
Shine1i
10d0926718 refactor: enhance recipe validation flows with error collection, seed-specific updates, and improved UX in execution dialogs 2026-02-23 20:34:53 +01:00
Shine1i
5765164ffc refactor: streamline recipe execution flows with validation support and enhanced run dialog interactions 2026-02-23 20:28:41 +01:00
Shine1i
e61aab37d7 refactor: improve dialog rendering and logging setup for stability and configurability 2026-02-23 20:16:03 +01:00
Leo Borcherding
86388a0242 fix: disable eval by default, set eval_steps to 0.0
- Changed default eval_steps from 0.01 to 0.0 across backend and frontend
- Fixed UI to allow eval_steps=0 (removed min=0.001 constraint)
- Added conditional eval logic with helpful console messages
- Updated tooltip to explain how to disable evaluation
- Tested: confirmed eval disabled by default with eval_steps=0.0
2026-02-23 13:07:47 -06:00
imagineer99
52cd860008 feat: add Upload / Save / Reset training config from local YAML 2026-02-23 18:55:08 +00:00
Shine1i
a1b7bbf4f6 refactor: enhance seed configuration handling with added fields, dynamic chunking logic, and streamlined interactions 2026-02-23 19:40:13 +01:00
Shine1i
af00aeb9e4 refactor: improve seed source handling with additional type support, enhanced parsing logic, and text chunking optimization 2026-02-23 19:29:54 +01:00
Shine1i
19ec27c4d7 refactor: enhance seed source handling with new source types and streamlined inspection flows 2026-02-23 18:46:02 +01:00
imagineer99
c0065c172c feat: sort and filter dataset search results by model type relevance 2026-02-23 16:22:45 +00:00
Roland Tannous
de1303f10c Merge pull request #228 from unslothai/fix/cap-num-proc-multigpu-deadlock
Cap dataset.map num_proc on multi-GPU machines to prevent fork deadlocks
2026-02-23 19:04:22 +04:00
Roland Tannous
834013aae5 Cap dataset.map num_proc on multi-GPU machines to prevent fork deadlocks 2026-02-23 14:25:31 +00:00
Roland Tannous
591dfbd93a Merge branch 'nightly' into feature/transformers-v5-support 2026-02-23 13:40:16 +00:00
Roland Tannous
55c5e5352e Remove firebase-debug.log and setup_leo.sh from tracking and add to .gitignore 2026-02-23 17:38:22 +04:00
Roland Tannous
c8bd172e31 Remove firebase-debug.log and setup_leo.sh from tracking and add to .gitignore 2026-02-23 17:37:46 +04:00
Roland Tannous
fbc934c231 Merge branch 'nightly' into feature/transformers-v5-support 2026-02-23 13:32:51 +00:00
Roland Tannous
8c17cc803e Merge pull request #225 from unslothai/fix/fix-response-on-completion-truncation
fix: error on >30% sample drop after `train_on_responses_only` instead of silent DataLoader crash
2026-02-23 16:28:32 +04:00
Roland Tannous
d94f842158 fix: error on >30% sample drop after train_on_responses_only instead of silent DataLoader crash 2026-02-23 12:21:06 +00:00
Roland Tannous
aa9874b0f5 Merge nightly into main Brings main up to date with nightly, including chat attachments, model-per-thread persistence, speech recognition, VRAM recommendations, MoE model configs, VLM fixes, and compile cache cleanup. Conflicts resolved by taking nightly's version for all diverged files (main-only changes were a feature add + immediate revert with net zero effect). 2026-02-23 14:52:57 +04:00
Roland Tannous
2fbde1cf70 added shutil import to main.py 2026-02-23 07:44:59 +00:00
Roland Tannous
036d85c9e4 Merge nightly into feature/transformers-v5-support 2026-02-23 07:40:28 +00:00
Roland Tannous
47879e0cbc Merge pull request #221 from unslothai/feature/clear-unsloth-compile-cache
feat: clear unsloth_compiled_cache on startup, shutdown, and between …
2026-02-23 11:30:46 +04:00
Roland Tannous
198433363a feat: clear unsloth_compiled_cache on startup, shutdown, and between model loads 2026-02-23 07:26:22 +00:00
Roland Tannous
072477b0bf Merge pull request #220 from unslothai/feature/moe-training-models-configs
Add model defaults for MoE models (Qwen3 MoE, GLM Flash) and GLM response mapping
2026-02-23 10:09:27 +04:00
Roland Tannous
62c260a109 Add GLM, Qwen3 MoE, TinyQwen3 MoE, and Ministral 3 VL model defaults and GLM train_on_responses_only mapping 2026-02-23 05:51:43 +00:00
Roland Tannous
c281f2a3c6 Remove stale .venv_overlay on server startup to prevent transformers version conflicts 2026-02-23 05:08:27 +00:00
Roland Tannous
ddfb3f7ad5 Clean up stale .venv_overlay directory during setup 2026-02-22 20:30:00 +00:00
Roland Tannous
778762eb28 Patch adapter_config.json with unsloth_training_method and auto-detect load_in_4bit for LoRA inference 2026-02-22 20:27:52 +00:00
Roland Tannous
4d0f7c525b Purge own utils/core modules and use lazy imports so is_vision_model picks up fresh AutoConfig after version switch 2026-02-22 20:04:35 +00:00
samit
281a06729e added cancel training button on the overlay 2026-02-22 12:03:26 -08:00
Roland Tannous
cf245adb63 Add transformers version switch to model config and vision check endpoints for dropdown selection 2026-02-22 19:56:12 +00:00
Roland Tannous
332e071b6c Install transformers into both site-packages and overlay to fix sub-package resolution during version switch 2026-02-22 19:44:12 +00:00
Roland Tannous
7d2a8be0c0 Move transformers overlay to local .venv_overlay/, add huggingface-hub to overlay install 2026-02-22 19:34:46 +00:00
Roland Tannous
4d9ab493f7 Use sys.path overlay to switch transformers versions in-process instead of modifying site-packages 2026-02-22 19:19:12 +00:00
Roland Tannous
66aaaa9af7 Fix in-memory transformers version detection and aggressive module purge for 5.1.0/4.57.1 switching 2026-02-22 19:08:18 +00:00
Roland Tannous
2f212f95a2 aggressive reload_transformers 2026-02-22 18:52:06 +00:00
Roland Tannous
f5b30448e8 Auto-switch transformers version (5.1.0/4.57.1) for Ministral-3, GLM-4.7-Flash, Qwen3-30B-A3B models with LoRA adapter resolution 2026-02-22 18:29:40 +00:00
Roland Tannous
709feff22c Merge pull request #217 from unslothai/fix/update-config-yamls
Fix vision LoRA defaults for VLMs and clean up text-only model configs
2026-02-22 19:14:54 +04:00
Roland Tannous
e866159e3b fix: correct vision LoRA defaults for VLMs and remove vision fields from text-only model configs 2026-02-22 15:09:10 +00:00
Roland Tannous
73297ad242 Merge pull request #215 from unslothai/fix/vlm-processing-class
fix: pass full Processor as processing_class for VLM SFTTrainer
2026-02-22 18:14:14 +04:00
Roland Tannous
e666442b6e fix: pass full Processor as processing_class for VLM SFTTrainer 2026-02-22 14:11:12 +00:00
Roland Tannous
b1071f4305 Merge pull request #213 from unslothai/fix/fix-clear-chat-new-model
Fix: Clear Chat and Manage Model Lifecycle on Model Switch
2026-02-22 17:54:27 +04:00
Roland Tannous
95c5c679bc feat(chat): persist model per thread and auto-load on thread switch 2026-02-22 13:35:45 +00:00
Roland Tannous
ef8cbdde93 feat(chat): eject current model and start fresh thread on model switch 2026-02-22 13:17:03 +00:00
Roland Tannous
1fa64ed2b9 Merge pull request #211 from unslothai/fix/param-count-display
Fix: Remove download count fallback when model param count is unavailable
2026-02-22 16:52:25 +04:00
Roland Tannous
cccf7d2558 Merge pull request #204 from unslothai/fix/image-preview-thumbnail
Fix: Resolve image preview thumbnail not rendering before send
2026-02-22 16:09:24 +04:00
Roland Tannous
0caab5846a Merge pull request #212 from unslothai/fix/stop-unclickable
Updated stop button to be unavailable during cancel training
2026-02-22 16:08:47 +04:00
Roland Tannous
ed4b933aa1 Merge pull request #208 from unslothai/revert-207-feature/attachment-restore
Revert "fix(chat): persist + hydrate user attachments in IndexedDB history"
2026-02-22 12:22:25 +04:00
Roland Tannous
94b4d8b4b3 Merge pull request #203 from unslothai/feat/sort-unsloth-models-first
Feat: Sort unsloth models first in HF search dropdowns
2026-02-22 12:21:42 +04:00
Roland Tannous
03f4337e48 feat: dual-query HF model search to surface all unsloth size variants first 2026-02-22 08:20:25 +00:00
imagineer99
27db6b287d fix: remove download count fallback when model param count is unavailable 2026-02-22 06:30:50 +00:00
Wasim Yousef Said
526dbf625e Merge pull request #209 from unslothai/feature/attachment-restore
fix(chat): persist + hydrate user attachments in IndexedDB history
2026-02-21 22:17:18 -08:00
Roland Tannous
ff68a01f61 Revert "fix(chat): persist + hydrate user attachments in IndexedDB history" 2026-02-22 10:15:24 +04:00
Wasim Yousef Said
bae0d2e67b Merge pull request #207 from unslothai/feature/attachment-restore
fix(chat): persist + hydrate user attachments in IndexedDB history
2026-02-21 22:09:53 -08:00
Shine1i
5535e5783d feat: add utils for deep cloning content and attachments in thread messages 2026-02-22 07:08:18 +01:00
Shine1i
49d565d535 refactor: simplify execution overview tab by removing unused token metrics and refining layout spacing 2026-02-22 06:36:32 +01:00
Shine1i
7f8796a0f4 refactor: extract and modularize execution tabs and helpers for enhanced code reusability and maintainability 2026-02-22 06:26:40 +01:00
Shine1i
e2b4d4dcc3 refactor: enhance execution row handling and dataset pagination for improved interactivity and preview support 2026-02-22 05:44:23 +01:00
Shine1i
9bcdd38418 refactor: extract reusable runtime utilities and unify execution dialog flows for preview and full runs 2026-02-22 05:37:33 +01:00
Shine1i
74ddb463c5 refactor: improve layout direction handling and auxiliary node visibility for LLMS 2026-02-22 05:18:33 +01:00
Shine1i
2c89cd9625 refactor: enhance variable handling with structured entries and UI updates for badges 2026-02-22 04:07:01 +01:00
Shine1i
ffdb8cecad refactor: extract reusable helpers and streamline seed inspection flow 2026-02-22 03:41:59 +01:00
imagineer99
ac399b152d fix: resolve image preview thumbnail not rendering before send 2026-02-22 02:39:56 +00:00
Shine1i
6784a244c9 feat: enhance dataset seed handling with inspection and UI improvements 2026-02-22 03:39:34 +01:00
imagineer99
5bdec309e6 feat: sort unsloth models first in HF search dropdowns 2026-02-22 01:45:51 +00:00
Shine1i
66cceb69fb merge: nightly into feature/canvas-lab 2026-02-22 02:31:32 +01:00
Shine1i
ebfe32bee9 refactor: replace inline labels with reusable FieldLabel component in dialogs 2026-02-22 02:30:04 +01:00
Shine1i
a8b6a653a9 refactor: update UI styles for graph nodes and components with consistent transitions and rounded elements 2026-02-22 02:20:51 +01:00
Shine1i
6f4c0c90bb refactor: streamline samplers and block handling, update dialogs and validation 2026-02-22 02:16:09 +01:00
Roland Tannous
88266fd973 Merge pull request #202 from unslothai/fix/rename-downloading-model-to-loading-model
renaming downloading model to loading model
2026-02-21 17:32:32 +04:00
Roland Tannous
73fe288e35 renaming downloading model to loading model 2026-02-21 13:30:41 +00:00
Roland Tannous
7d1d816177 Merge pull request #200 from unslothai/fix/sloth-z-index-overlay
fix: enable navbar z-index by adding relative position
2026-02-21 17:15:05 +04:00
Roland Tannous
8469605b72 Merge pull request #193 from unslothai/feature/vram-fit-chat
Added vram fit indicator to models in chat
2026-02-21 17:09:31 +04:00
Roland Tannous
d170398697 Merge pull request #196 from unslothai/fix/compare-dictate-attachment-buttons
Added dictate and add attachments feature in chat page
2026-02-21 16:52:56 +04:00
Roland Tannous
df518aa7cc move microphone icon in compare page to be next to send button 2026-02-21 12:51:38 +00:00
samit
e25966c6dc added SpeechRecognition declarations and missing type packages 2026-02-21 01:00:08 -08:00
imagineer99
9a26f04703 fix: enable navbar z-index by adding relative position 2026-02-21 08:37:47 +00:00
samit
54c42bf9f5 Added VRAM fit indicator to recoomended models 2026-02-20 23:55:10 -08:00
Roland Tannous
92c1eb1b35 Merge pull request #192 from unslothai/feature/model-download-status
Updated to edit loading as "downloading model"
2026-02-21 11:07:08 +04:00
samit
662f1bfbc4 updated stop button to unavailable during cancel training 2026-02-20 22:45:41 -08:00
Roland Tannous
0459944d7c Merge pull request #188 from unslothai/fix/gemma-3-chat
fixed the vlm's text only errors
2026-02-21 10:16:20 +04:00
samit
80976f8c70 Added dictate and add attachments feature 2026-02-20 22:14:27 -08:00
Roland Tannous
ef118d0d05 fix: load proper vision processor from base model when FastVisionModel returns raw tokenizer, add tokenize=False to vision chat template 2026-02-21 04:40:29 +00:00
Manan17
e9710874e1 Mapping proper tokenizer for VLMs 2026-02-21 01:57:05 +00:00
samit
262ffa59af added vram fit indicator to models in chat 2026-02-20 17:25:03 -08:00
samit
862e171ff5 updated to edit loading as downloading model 2026-02-20 15:49:33 -08:00
Manan17
756aa56cd2 fixed the vlm's text only errors 2026-02-20 22:23:26 +00:00
Roland Tannous
eb761a0b8c Merge pull request #187 from unslothai/fix/fix-git-clone-branch-colab
removed branch from colab git clone
2026-02-20 23:16:06 +04:00
Roland Tannous
b8fa5f9482 removed branch from colab git clone 2026-02-20 19:15:03 +00:00
Roland Tannous
0d0038b901 Merge pull request #186 from unslothai/fix/colab-setup-fixes
Fix/colab setup fixes
2026-02-20 23:08:25 +04:00
Roland Tannous
e1a24c1ee9 add huggingface-hub==0.36.0 due to colab error 2026-02-20 18:26:20 +00:00
Roland Tannous
7c67228c40 add huggingface-hub==0.36.0 due to colab error 2026-02-20 18:24:48 +00:00
Roland Tannous
3bd0b8fb8b moved transformers4.57.1 to no-extra-deps 2026-02-20 18:08:58 +00:00
Roland Tannous
8b40894554 Merge pull request #180 from unslothai/fix/dropdown-menu-prefill
Fix: model and dataset dropdowns selecting stale value on Enter
2026-02-20 22:01:35 +04:00
Roland Tannous
fffb2ea22e Merge branch 'nightly' into fix/dropdown-menu-prefill 2026-02-20 17:44:06 +00:00
Roland Tannous
673c681cd6 Merge pull request #185 from unslothai/fix/remove-warmup-text-inference-status
Fix: remove warmup text inference status
2026-02-20 21:14:37 +04:00
imagineer99
2697b9ed74 fix: remove warmup text inference status 2026-02-20 15:35:06 +00:00
Shine1i
f2839ebc68 refactor: extract and consolidate execution runtime and tracking logic 2026-02-20 14:41:38 +01:00
Shine1i
d1fbf272b0 feat: add recipe execution stores, hooks, and logic for managing preview and full executions 2026-02-20 14:38:05 +01:00
Shine1i
40550df3c1 refactor: simplify execution view by removing unused state and redundant logic 2026-02-20 14:19:52 +01:00
Shine1i
c95bd3d75d feat: refine execution view with enhanced summary and insights
- Removed unused model usage properties (`total`, `tps`, `requestsSuccess`, etc.) for cleaner data handling.
- Added new metrics: total input/output tokens, null rate, and low uniqueness flags.
- Improved UI for execution summary cards with consolidated insights and model usage tables.
- Introduced detailed analysis for dataset columns, including dropped columns and LLM column counts.
- Optimized rendering logic to reduce clutter and enhance user experience.
2026-02-20 14:05:43 +01:00
Shine1i
394dc24048 feat: enhance execution log tracking, progress updates, and data visualization
- Added `log_lines` field to track and display runtime logs for executions.
- Enhanced progress tracking with terminal-like log outputs and live log scrolling.
- Introduced detailed "model usage" and "dropped columns" analysis in `ExecutionsView`.
- Optimized UI components for displaying dataset metrics, including input/output token averages.
2026-02-20 13:51:19 +01:00
Shine1i
415312a637 feat: improve dataset column visibility and cell expansion in ExecutionsView
- Added column visibility toggles using a dropdown menu for greater customization.
- Introduced expandable table cells for long values with "expand/collapse" functionality.
- Ensured hidden columns reset on execution change, providing a consistent user experience.
2026-02-20 13:04:57 +01:00
Shine1i
0891f19eea feat: enhance progress tracking for execution jobs
- Added logic to calculate and manage column-level progress for job executions.
- Introduced `progress_columns_total` and `_column_done` fields for more granular progress updates.
- Improved overall progress computation by considering total columns and individual progress per column.
2026-02-20 12:52:45 +01:00
Shine1i
f84454ecb8 feat: refactor and extend recipe execution logic
- Extracted shared execution utilities into `execution-helpers.ts` for reusability across features.
- Replaced deprecated `/preview` endpoint and its logic with unified job execution handling.
- Consolidated job execution flows ("Preview" and "Full Run") into shared `runJobExecution` logic.
- Enhanced execution progress tracking with support for column-level progress reporting.
- Added support for handling execution job events and improved error reporting from the backend.
- Updated backend to better manage dataset access errors and provide more informative error messages.
- Cleaned up redundant code in `use-recipe-studio-actions` and streamlined execution APIs.
2026-02-20 12:47:51 +01:00
imagineer99
48ddbd96f9 Fix: model and dataset dropdowns selecting stale value on Enter 2026-02-20 11:33:20 +00:00
Shine1i
8edd8ba95b feat: add dataset pagination support for recipe executions
- Introduced backend changes to handle dataset pagination with limit, offset, and total row support.
- Updated frontend execution view with dataset pagination controls, including "Next" and "Prev" buttons.
- Extended recipe execution logic to manage dataset pagination details like page number, page size, and total records.
2026-02-20 12:12:02 +01:00
Shine1i
d703059f0d feat: add support for full recipe executions with detailed progress and analysis
- Introduced "Full Run" support in execution logic, including progress tracking, cancellation, and job status updates.
- Extended backend to manage full execution jobs, handle dataset previews, and return detailed analysis and artifacts.
- Updated frontend components to support full runs, with execution sorting, live updates, and detailed execution views.
- Enhanced `ExecutionsView` with progress indicators, status filtering, and dataset preview capabilities.
- Added IndexedDB schema migration to track additional execution metadata.
2026-02-20 12:05:42 +01:00
Roland Tannous
046419cee5 Merge pull request #179 from unslothai/fix/copy-mac
Added the copy feature on mac
2026-02-20 14:38:29 +04:00
Shine1i
ac776c5aad feat: introduce execution tracking and analysis for recipe preview
- Added `ExecutionsView` with execution history tracking, live updates, and detailed data analysis.
- Implemented IndexedDB support via Dexie to persist execution records locally.
- Enhanced backend preview logic to return execution analysis and artifacts.
- Updated studio header with view toggling between "Editor" and "Executions."
2026-02-20 11:34:25 +01:00
Roland Tannous
66b64f0636 Merge pull request #166 from unslothai/feat/download-progress-indicator
feat: add download progress indicators for dataset preview and training overlay
2026-02-20 14:11:07 +04:00
Roland Tannous
0c9d18a22d Merge pull request #172 from unslothai/fix/training-param
Added optim and lr_scheduler_type in the frontend
2026-02-20 14:05:33 +04:00
Shine1i
3dd1566b85 refactor: remove Jinja autocomplete components and simplify variable handling
- Deleted `jinja-ref-autocomplete` components and related hooks.
- Replaced custom Jinja variable autocomplete with standard `Textarea` and `Input` components.
- Streamlined variable handling logic by replacing `getAvailableRefItems` with `getAvailableVariables`.
- Removed unused state (`flowMoving`) and redundant logic tied to Jinja-specific functionality.
2026-02-20 10:36:51 +01:00
samit
076b1db75b edited the font of the new parameters 2026-02-20 01:29:37 -08:00
Wasim Yousef Said
a5ad6ff12f Merge branch 'nightly' into feature/canvas-lab 2026-02-20 01:23:44 -08:00
Roland Tannous
fc8259df4a Merge pull request #173 from unslothai/fix/hf-token-model-hiding
added hf token validation
2026-02-20 13:19:31 +04:00
samit
a96c7c8cea added the copy on mac 2026-02-20 00:49:38 -08:00
Roland Tannous
dee72fc155 added NODE OPTIONS export , updating npm to 2.2.6 2026-02-20 08:27:09 +00:00
samit
474e4be1ac added lr_scheduler type to the frontend 2026-02-19 23:31:46 -08:00
Roland Tannous
ef9579e7c2 Merge pull request #175 from unslothai/fix/changing-num-proc-for-filtering
Fix/changing num proc for filtering
2026-02-20 10:39:11 +04:00
Roland Tannous
be2d44fa3e Merge pull request #171 from unslothai/fix/compare-mode-race-and-adapter-toggle
Fixing compare feature
2026-02-20 10:38:56 +04:00
Manan17
bd0cee8c15 Setting it to total cpu_count // 4 2026-02-20 06:32:01 +00:00
samit
6a2309a8fd added hf token validation 2026-02-19 21:05:27 -08:00
samit
68bef70ca3 added optim in the frontend 2026-02-19 15:29:23 -08:00
Manan17
444ece6b07 Fixing compare feature 2026-02-19 20:15:44 +00:00
Roland Tannous
1eca824513 Merge pull request #169 from unslothai/feature/backwards-compatibility-unsloth-ui-command
Add `unsloth-ui` alias for backwards compatibility
2026-02-19 22:44:41 +04:00
Roland Tannous
1bb79defd0 add unsloth-ui shell alias for backwards compatibility alongside unsloth-studio 2026-02-19 18:41:10 +00:00
Roland Tannous
3c3f69ec71 Merge pull request #168 from unslothai/fix/cli-studio-command-update
Update `studio` CLI command to use new FastAPI backend
2026-02-19 22:17:37 +04:00
Roland Tannous
3dc8f8844f rename cli studio command to use new FastAPI backend and add unsloth-ui alias for backwards compatibility 2026-02-19 17:59:22 +00:00
Roland Tannous
aab2fe8805 Merge pull request #167 from unslothai/fix/train_on_completions-dataset-check-improvements
Simplify dataset check to 2-tier, improve multimodal detection, auto-set trainOnCompletions, recheck dataset on reload
2026-02-19 15:35:50 +04:00
Roland Tannous
11b3029dc6 Simplify dataset check to 2-tier, improve multimodal detection, auto-set trainOnCompletions, recheck dataset on reload 2026-02-19 11:25:54 +00:00
imagineer99
0983996f2d feat: add download progress indicators for dataset preview and training overlay 2026-02-19 08:22:23 +00:00
Roland Tannous
1722b6383e Auto-set trainOnCompletions based on vision/multimodal state, default all model configs to true, and re-fetch model defaults on page reload 2026-02-19 06:40:40 +00:00
Roland Tannous
58753151ef change train_on_completions to true 2026-02-19 06:02:16 +00:00
Roland Tannous
9368c8cf9e Revert "Setting default for the train on responses only"
This reverts commit f6e4908acf.
2026-02-19 09:55:21 +04:00
Roland Tannous
33dca2a52b Merge pull request #163 from unslothai/fix/add-vision-and-dataset-to-local
Fix/add vision and dataset to local
2026-02-19 09:46:54 +04:00
Roland Tannous
f4ac333ec9 Merge pull request #161 from unslothai/fix/vision-model-detection
Fixing Vision model detection
2026-02-19 09:43:30 +04:00
Manan17
5d8aa1de8e Adding vision and multimodal dataset to the localstorage 2026-02-19 05:06:41 +00:00
Manan17
f6e4908acf Setting default for the train on responses only 2026-02-19 02:59:48 +00:00
Manan17
2755cf922d Passing use_auth = True and also having different checks which is missed by the is_vision function 2026-02-19 02:55:46 +00:00
Roland Tannous
0ff1e498ad Merge pull request #159 from unslothai/fix/reduce_dataset_num_proc_25_pct
Fix/reduce dataset num proc 25 pct
2026-02-19 00:55:02 +04:00
Roland Tannous
c876b38780 reduce dataset_num_proc to 1/4 of cpu_count 2026-02-18 20:53:32 +00:00
Roland Tannous
648b29ac9b Merge pull request #155 from unslothai/fix/sft-tokenizer-unwrap-for-vlm-text
fix: Unwrap ProcessorMixin to raw tokenizer for text-only SFTTrainer on VLM-architecture models
2026-02-18 23:19:57 +04:00
Roland Tannous
4cdd2a37c6 fix: unwrap ProcessorMixin to raw tokenizer for text-only SFTTrainer on VLM-architecture models 2026-02-18 19:16:45 +00:00
Roland Tannous
23214c41c0 fix: unwrap ProcessorMixin to raw tokenizer for text-only SFTTrainer on VLM-architecture models 2026-02-18 19:13:20 +00:00
Roland Tannous
7ee9f5dc5d Merge pull request #154 from unslothai/feature/colab-notebook
Add Google Colab Support for Unsloth Studio
2026-02-18 23:02:22 +04:00
Roland Tannous
9840864662 Merge remote-tracking branch 'origin/nightly' into fix/dataset-mapping-vlm-text-datasets 2026-02-18 18:11:45 +04:00
Roland Tannous
ad638118b9 Merge remote-tracking branch 'origin/nightly' into feature/colab-notebook 2026-02-18 17:41:07 +04:00
Roland Tannous
5319e1a3e6 Merge branch 'fix/sm_120-flex-attention-temp-disable' into nightly
renamed UNSLOTH_FLASH_ATTENTION to UNSLOTH_ENABLE_FLASH_ATTENTION to match actual environment variable in
unsloht
2026-02-18 09:24:52 +00:00
Roland Tannous
ae040cf681 renamed UNSLOTH_FLEX_ATTENTION to UNSLOTH_ENABLE_FLEX_ATTENTION 2026-02-18 09:21:53 +00:00
Roland Tannous
f9ff4b95d7 Merge pull request #152 from unslothai/fix/sm_120-flex-attention-temp-disable
Disable flex attention on Blackwell+ GPUs (sm_120+) at startup
2026-02-18 13:00:43 +04:00
Roland Tannous
e3f4a9eb32 Disable flex attention on Blackwell+ GPUs (sm_120+) at startup 2026-02-18 08:58:25 +00:00
Roland Tannous
e44a8517ac Merge pull request #151 from unslothai/fix/trainer-hang-resource-cleanup
Fix/trainer hang resource cleanup
2026-02-18 12:39:40 +04:00
Roland Tannous
29b25169c0 Scale dataset num_proc dynamically to cpu_count//3 instead of hardcap 8 2026-02-18 08:38:53 +00:00
Manan17
949e57c334 fixing the hangup of training after multiple back to back training processes 2026-02-18 08:18:13 +00:00
Manan17
db0fa1a270 Dividing the total cpu_count // 3 2026-02-18 07:59:57 +00:00
Roland Tannous
c616697b22 Merge pull request #148 from unslothai/fix/linear
linear fix
2026-02-18 11:10:16 +04:00
Manan17
c832c903b4 fix the linear path on backend 2026-02-18 07:08:32 +00:00
Roland Tannous
38e577ef26 Merge pull request #145 from unslothai/fix/check-format-sample
fix: stream HF datasets in check-format endpoint to avoid full d…
2026-02-18 10:49:17 +04:00
Roland Tannous
be5155a258 Merge pull request #146 from unslothai/feature/fix-cuda-fork-deadlock
fix: cap dataset.map() num_proc to 8 to prevent CUDA fork deadlocks
2026-02-18 10:47:46 +04:00
Lee Jackson
f4279609a9 Merge pull request #147 from unslothai/feat/disable-navbar-training
feat: disable navbar navigation while training is active
2026-02-18 01:37:11 +00:00
imagineer99
ef7c54ee3c feat: disable navbar navigation while training is active
Disable Export and Chat nav items (desktop + mobile) when
isTrainingRunning is true, keeping only Studio clickable.
2026-02-18 01:30:13 +00:00
Roland Tannous
9d737559a5 debug statements 2026-02-18 00:37:09 +00:00
Roland Tannous
d94a1e0289 fix: normalize target_modules [all-linear] list to string for Unsloth/PEFT compatibility 2026-02-18 00:32:21 +00:00
Manan17
fa75a8171a linear fix 2026-02-18 00:11:27 +00:00
Roland Tannous
61e323f603 Update README.md 2026-02-18 03:58:44 +04:00
Roland Tannous
f0613f5d07 fix: defensively rename VLM chat column to match model's forward() signature 2026-02-17 23:49:13 +00:00
Roland Tannous
c0f210bc2a fix: cap dataset.map() num_proc to 8 to prevent CUDA fork deadlocks 2026-02-17 23:12:45 +00:00
Roland Tannous
4d0c6d20b3 fix: fix: stream HF datasets in check-format endpoint to avoid full downloads; add info logging to model config endpoints 2026-02-17 22:53:29 +00:00
Roland Tannous
45def98a67 Merge pull request #144 from unslothai/fix/remove-hardcoded-port-in-dataset-preview
fix: remove hardcoded port from dataset preview error message
2026-02-18 02:44:17 +04:00
imagineer99
f9857f5366 fix: remove hardcoded port from dataset preview error message 2026-02-17 22:37:52 +00:00
Shine1i
b31461790f feat: enhance training stop and reset flow with detailed checks 2026-02-17 23:32:22 +01:00
Leo Borcherding
84b9a8aef6 Merge nightly into feature/colab-notebook - resolved setup.sh conflicts 2026-02-17 15:51:14 -06:00
Roland Tannous
aba1c213e5 update gitignore 2026-02-17 21:45:05 +00:00
Leo Borcherding
095895d540 Add GPU check as first cell in notebook 2026-02-17 15:29:29 -06:00
Wasim Yousef Said
8fbc80f66a Merge pull request #143 from unslothai/feature/local-models
feat: add schemas for local model discovery and listing
2026-02-17 13:10:04 -08:00
Shine1i
a2cf89214e feat: add schemas for local model discovery and listing 2026-02-17 21:53:42 +01:00
Roland Tannous
e2ca231013 Merge pull request #142 from unslothai/feature/wsl-gguf-sudo-fix
fix: skip sudo check on WSL during GGUF export to prevent password pr…
2026-02-18 00:46:15 +04:00
Wasim Yousef Said
492e3c3dbf Merge pull request #141 from unslothai/feature/uxui-heuristics
style: improve layout consistency and responsiveness across components
2026-02-17 12:34:37 -08:00
Shine1i
94296f91a1 style: improve layout consistency and responsiveness across components
- Adjusted padding, spacing, and grid configurations for better alignment and scaling across screen sizes.
- Enhanced mobile responsiveness by updating flex and grid layouts, ensuring optimal display on smaller devices.
- Tuned container dimensions and card styling to maintain design consistency.
2026-02-17 21:27:02 +01:00
Leo Borcherding
68dc6d387a Skip venv creation in Colab, install packages directly 2026-02-17 14:21:56 -06:00
Wasim Yousef Said
767f613479 Merge pull request #140 from unslothai/feature/uxui-heuristics
ux: improve training-to-chat flow, param defaults UX, and guided onboarding/export polish
2026-02-17 12:10:27 -08:00
Shine1i
0b8df881fc refactor: wrap splash screen content in a card for improved layout and consistency 2026-02-17 21:08:45 +01:00
Leo Borcherding
7486a1c00f Detect Colab environment and upgrade npm directly instead of using nvm 2026-02-17 13:57:45 -06:00
Shine1i
cf21c4e996 feat: add session-based storage for chat training comparison handoff
- Implemented a utility to manage `training-compare-handoff` data in `sessionStorage` with strict validation and expiration logic.
- Added methods to set, retrieve, and clear handoff data for improved chat training flow.
2026-02-17 20:43:08 +01:00
Shine1i
b0e7479699 fix chat compare handoff: auto-load trained lora, stop refresh loop, add debug logs 2026-02-17 20:42:43 +01:00
Roland Tannous
c5558312c8 fix: skip sudo check on WSL during GGUF export to prevent password prompt hang 2026-02-17 19:30:02 +00:00
Leo Borcherding
a88b98aafa Remove unnecessary if statement for token check 2026-02-17 13:27:05 -06:00
Shine1i
f0a4f77028 feat: enhance training flow with new runtime hints, adjustable steps/epochs
- Added halfway/completed training hints with actionable links.
- Introduced sliders for adjusting max steps and epochs dynamically.
- Refined tooltip explanations for configuration parameters.
- Enabled custom overlay styling for `AlertDialogContent`.
2026-02-17 20:08:02 +01:00
Roland Tannous
a3984c5f05 Merge pull request #139 from unslothai/fix/move-backend-requirements
move requirements/ to studio/backend/ and update paths in setup.sh
2026-02-17 23:04:44 +04:00
Roland Tannous
bcd9416ffb move requirements/ to studio/backend/ and update paths in setup.sh 2026-02-17 19:02:25 +00:00
Leo Borcherding
1a39d956b8 Clone feature/colab-notebook branch for colab.py 2026-02-17 13:01:16 -06:00
Leo Borcherding
fe27a413cb Simplify notebook to use existing setup.sh script 2026-02-17 12:54:07 -06:00
Roland Tannous
f02cd32c56 Merge pull request #138 from unslothai/fix/reset-max-steps-epoch-defaults
Override Model Defaults for num_epochs and max_steps
2026-02-17 22:51:40 +04:00
Roland Tannous
028408e432 chore: override model defaults to use max_steps=30, save_steps=30, num_epochs=0 for testing 2026-02-17 18:46:23 +00:00
Wasim Yousef Said
862bbbfac5 Merge pull request #137 from unslothai/feature/chart-fixes
rafactor: fix training charts: sticky full-window follow latest + grad line render + stopped metric fallback
2026-02-17 10:41:01 -08:00
Shine1i
a7cb9da010 refactor: simplify chart view logic by removing pan controls and enhancing window size handling 2026-02-17 19:32:32 +01:00
Shine1i
f73f1c6a0a feat: add reusable chart components for training metrics visualization
- Introduced `EvalLossChartCard`, `GradNormChartCard`, `LearningRateChartCard`, and `TrainingLossChartCard` components.
- Implemented shared chart settings via `SharedChartSettings` to manage scale, outliers, and view configuration.
- Added utilities for metrics formatting, step tick generation, data compression, and smoothing (`utils.ts`).
- Created types and structures for chart data handling (`types.ts`).
2026-02-17 19:10:24 +01:00
Roland Tannous
9c02e400af Merge pull request #130 from unslothai/integrate/exports-page
Integrate/exports page
2026-02-17 22:10:10 +04:00
Roland Tannous
4816ec3e95 Merge branch 'nightly' into integrate/exports-page 2026-02-17 22:09:36 +04:00
Roland Tannous
2cc3f03fbe Merge pull request #136 from unslothai/setup/update-setup-sh-dependencies
setup.sh: Replace inline pip installs with pinned requirements files
2026-02-17 22:04:03 +04:00
Roland Tannous
09f682635d replace with patch from merged PR in unsloth-zoo 2026-02-17 17:55:05 +00:00
Wasim Yousef Said
0ccb42e577 Merge pull request #135 from unslothai/feature/chart-fixes
feat: integrate gradient norm tracking in training runtime and metrics
2026-02-17 09:49:29 -08:00
Shine1i
f47c424be3 feat: integrate gradient norm tracking in training runtime and metrics
- Enhanced chart logic to filter and visualize finite gradient norm values.
2026-02-17 18:26:59 +01:00
Wasim Yousef Said
416e594d6f Merge pull request #134 from unslothai/feature/model-configs
feat: Apply model-config defaults in onboarding + studio
2026-02-17 09:08:21 -08:00
Shine1i
d9e5cc89fe refactor: streamline vision model detection and improve state persistence logic
- Removed redundant vision-check controllers.
- Added `NON_PERSISTED_STATE_KEYS` to manage persisted training state.
- Introduced `partializePersistedState` for cleaner state filtering.
2026-02-17 18:01:45 +01:00
Shine1i
019d52a019 feat: add default model configuration mapping and auto-apply logic
- Implemented backend model configuration mapping to training state.
- Added auto-apply logic for default configurations when models are selected.
- Introduced utilities for type conversion and validation within training configuration.
2026-02-17 17:58:36 +01:00
Roland Tannous
5dd93579c2 add full dependency chain for unsloth + unsloth-extras 2026-02-17 14:21:18 +00:00
Leo Borcherding
90c553280d fix: Add GitHub authentication cell for private repo
- Add cell 1 for token input (getpass)
- Update clone command to use token from environment
- Now 3 cells: auth, setup, start
2026-02-17 05:07:46 -06:00
Leo Borcherding
1580a6a925 fix: Clean up notebook to just 2 cells
Remove all the overcomplicated markdown and extra cells.
Now it's exactly like the POC: setup and start only.
2026-02-17 05:03:59 -06:00
Leo Borcherding
7fb720b4fc feat: Add simple 2-cell Colab notebook (no tunnel needed)
- Create studio/backend/colab.py using Colab's built-in proxy
- Uses google.colab.kernel.proxyPort() for URL (no cloudflare)
- Shows nice clickable link with IPython.display.HTML
- Notebook has just 2 cells: setup and start
- Much simpler than external tunneling approach
2026-02-17 04:57:30 -06:00
Roland Tannous
ef185f1fea Remove exports/ from tracking 2026-02-17 07:57:43 +00:00
Roland Tannous
beac284471 added llama.cpp python dependencies to setup.sh 2026-02-17 07:56:27 +00:00
Roland Tannous
c9e119b07b fix: vite build fail - suppress unused estimatedSize prop in export dialog 2026-02-17 07:21:23 +00:00
Roland Tannous
1dd65c1d87 Merge pull request #129 from unslothai/fix/adding-meta-data-for-checkpointing-api
Adding metadata for checkpoints
2026-02-17 11:17:24 +04:00
Lee Jackson
0247f16253 Merge pull request #132 from unslothai/fix/dataset-check-format-subset-param
fix: subset param name
2026-02-17 05:57:05 +00:00
imagineer99
cf364fca19 fix: subset param name 2026-02-17 05:53:21 +00:00
Manan17
e964209c54 Integration of the api with the EXPORT page with UI changes 2026-02-17 00:34:48 +00:00
Manan17
8f1db03c15 Adding metadata for checkpoints 2026-02-16 23:46:17 +00:00
Wasim Yousef Said
16f79a73de Merge pull request #124 from unslothai/feature/bug-fixes
feat: support disabling top-k sampling with -1 and standardize normalization
2026-02-16 13:21:12 -08:00
Roland Tannous
3fc9cdecae Merge pull request #122 from unslothai/feature/eval-split-auto-detection
[Feature] evaluation during training
2026-02-17 01:13:46 +04:00
Roland Tannous
108ec254cb Merge branch 'nightly' into feature/eval-split-auto-detection 2026-02-17 01:11:30 +04:00
Roland Tannous
32e779fef5 Merge pull request #121 from unslothai/fix/vision-model-fixes
fix: Vision model detection and model-dataset compatibility
2026-02-17 00:39:58 +04:00
Shine1i
4be6eefed3 feat: support disabling top-k sampling with -1 and standardize normalization logic
- Updated top-k parameter range to accept -1 in models and frontend.
- Added utility to normalize top-k for backend compatibility.
2026-02-16 21:33:24 +01:00
Roland Tannous
18879a521b feat: auto-detect model+dataset compatibility to select VLM vs LLM training path 2026-02-16 19:18:49 +00:00
Roland Tannous
367bf1ff7f feat(frontend): auto-detect vision models via backend, separate search filter from model classification 2026-02-16 18:24:44 +00:00
Roland Tannous
e75a93b7f3 Merge pull request #120 from unslothai/fix/back-on-complete
fix: show Back to configuration breadcrumb when training completes
2026-02-16 21:38:40 +04:00
Roland Tannous
7401b22c16 fix: show Back to configuration breadcrumb when training completes 2026-02-16 17:34:52 +00:00
Roland Tannous
121435f8c5 Merge pull request #119 from unslothai/feature/base-model-chat-template-handling
fix:  Apply default chat template for base models without tokenizer chat_template
2026-02-16 20:52:17 +04:00
Roland Tannous
ed6d4b2fb6 feat: apply default chat template for base models without tokenizer chat_template 2026-02-16 15:56:06 +00:00
Roland Tannous
3b117189c5 feat: add eval_enabled flag and format-first-then-split for eval dataset 2026-02-16 14:13:55 +00:00
Roland Tannous
5962bec41a feat: add eval split auto-detection, eval_steps hyperparam, and eval_loss chart integration 2026-02-16 13:51:10 +00:00
Roland Tannous
90c3561adb feat: add eval split auto-detection, eval_steps hyperparam, and eval_loss chart integration 2026-02-16 13:38:54 +00:00
Roland Tannous
d4b8d7d150 Merge pull request #118 from unslothai/feature/onboarding-hardware-info
feat(onboarding): hook system info to live /api/system…
2026-02-16 16:29:22 +04:00
Roland Tannous
68df1c6306 feat(onboarding): replace hardcoded system info with live /api/system/hardware data 2026-02-16 12:26:49 +00:00
Roland Tannous
8c66378a95 Merge pull request #116 from unslothai/feature/gpu-monitor-training
feat: add live GPU monitor with nvidia-smi polling during training
2026-02-16 15:52:48 +04:00
Roland Tannous
d49506b7b1 feat: add live GPU monitor with nvidia-smi polling during training 2026-02-16 11:47:43 +00:00
Roland Tannous
37b4c1ef25 Merge pull request #115 from unslothai/feature/api-hardware-info
feat: add GET /api/system/hardware endpoint for GPU info and package versions
2026-02-16 14:35:06 +04:00
Roland Tannous
f3aa353540 feat: add GET /api/system/hardware endpoint for GPU info and package versions 2026-02-16 10:29:21 +00:00
Roland Tannous
4c78ce5df4 Merge pull request #114 from unslothai/feature/checkpoint-loss-in-api
feat: include training loss per checkpoint in API response
2026-02-16 13:53:53 +04:00
Roland Tannous
1109839d2c feat: include training loss per checkpoint in /api/models/checkpoints response 2026-02-16 09:50:28 +00:00
Roland Tannous
8949770f25 Merge pull request #113 from unslothai/feature/refactor-checkpoints-pull-endpoint
Refactor: Move checkpoint scanning to models domain
2026-02-16 13:34:08 +04:00
Roland Tannous
8a239dc83e refactor: move checkpoint scanning to utils/models and /checkpoints endpoint to models router 2026-02-16 09:32:11 +00:00
Shine1i
d05bfa3264 feat: add index route with auth guard and redirect logic 2026-02-16 09:57:41 +01:00
Roland Tannous
be584ccfa7 Merge pull request #97 from unslothai/fix/progress-metics
Resolved the progress metrics
2026-02-16 11:55:01 +04:00
sshah229
5bf2472af9 modified the num_tokens logic 2026-02-16 00:38:40 -07:00
Roland Tannous
0018f936f0 Merge pull request #109 from unslothai/feat/backend-generation-implement-min-p
feat: add `min_p` sampling parameter to `/chat/completions` generation pipeline
2026-02-16 10:54:15 +04:00
Roland Tannous
6b839a1481 feat: add min_p sampling parameter to /chat/completions generation pipeline 2026-02-16 06:33:17 +00:00
Wasim Yousef Said
a00e915a6b Merge pull request #108 from unslothai/feature/inference-params
feat(chat): apply recommended inference params on model load
2026-02-15 22:19:48 -08:00
Shine1i
9e42629b63 feat: add inference parameter merging for model loading and runtime updates 2026-02-16 07:14:53 +01:00
Lee Jackson
ad418c5616 Merge pull request #107 from unslothai/feat/chat-min-p
feat: add min_p inference parameter to chat page
2026-02-16 05:49:10 +00:00
imagineer99
570ca6758f feat: add min_p inference parameter to chat page 2026-02-16 05:41:36 +00:00
Roland Tannous
9a6476836e Merge pull request #106 from unslothai/fix/adding-checkpointing-data-to-api
Fixing the get checkpoint api
2026-02-16 09:13:57 +04:00
Manan17
eae183504e Fixing the get checkpoint api 2026-02-16 04:47:28 +00:00
Roland Tannous
002d0059b6 Merge pull request #105 from unslothai/feature/setup-shell-improvements
Auto-detect Python version & shell RC file in setup script
2026-02-16 08:15:58 +04:00
Roland Tannous
b0b1f74834 setup: auto-detect best Python ≤3.12 and write alias to user's default shell rc file 2026-02-16 04:10:05 +00:00
Roland Tannous
28ff6fb578 Merge pull request #104 from unslothai/feature/support-dataset-configs-splits
dataset `subset`/`split` params from API routes through to `load_dataset` calls
2026-02-16 07:59:09 +04:00
Roland Tannous
38cb5c9496 feat: thread dataset subset/split params from API routes through to load_dataset calls 2026-02-16 03:56:22 +00:00
Wasim Yousef Said
a7fe970c11 Merge pull request #103 from unslothai/feature/format-mapping
feat: dataset manual mapping (2-col)
2026-02-15 17:10:50 -08:00
Shine1i
9fe013a4f0 feat: lock model selector during guided tour and refine open state logic 2026-02-16 02:05:53 +01:00
Shine1i
cdfa4da226 merge: nightly 2026-02-16 02:02:40 +01:00
Shine1i
be745d1637 refactor: create utilities for dataset manual mapping and improve UI logic consistency in dataset preview dialog 2026-02-16 01:54:09 +01:00
Shine1i
1420b7c28a fix: enforce unique input/output mapping and enhance UI feedback in dataset preview dialog 2026-02-16 01:47:28 +01:00
Shine1i
4cb881313d feat: implement dataset mapping UI and preview dialog 2026-02-16 01:44:26 +01:00
Wasim Yousef Said
691963b45e Merge pull request #102 from unslothai/feature/guided-tour-p2
feat: Guided tours p2: per-page + navbar trigger
2026-02-15 16:10:07 -08:00
Shine1i
a6bf95d13d feat: enable conditional confetti in guided tour and update navbar icon 2026-02-16 01:04:54 +01:00
Shine1i
0e2cd7d92f chore: text update 2026-02-16 00:58:46 +01:00
Shine1i
34f2e5b792 feat: improve guided tour descriptions and add sidebar state management
- Updated step descriptions across Studio, Chat, and Export tours for better clarity.
- Added `openSidebar` state management function and integrated it into the tour logic.
- Improved target detection in guided tours with retry logic for better handling of unavailable elements.
2026-02-16 00:55:13 +01:00
Shine1i
c7ff1687e6 feat: implement guided tours and refactor model selector components 2026-02-15 23:43:10 +01:00
Shine1i
047899ae0f gitignore: .omx 2026-02-15 23:00:01 +01:00
Wasim Yousef Said
f2b3eb9a46 Merge pull request #101 from unslothai/feature/guided-tour
feat: studio: guided tour (1st visit, skippable)
2026-02-15 12:33:07 -08:00
Wasim Yousef Said
d33791f173 Merge pull request #100 from unslothai/feature/chat-compare
feat: chat compare + inference stream cancel fix
2026-02-15 12:29:54 -08:00
Shine1i
c059bdf6b2 setup: nightly 2026-02-15 21:26:11 +01:00
Shine1i
89f790c2a2 revert setup.sh 2026-02-15 21:24:30 +01:00
Wasim Yousef Said
17c98f5a4b Merge pull request #98 from unslothai/feat/dataset-config-splits
feat: check dataset configs and splits before hitting check-format
2026-02-15 12:17:22 -08:00
Wasim Yousef Said
f99e4318e5 Merge pull request #99 from unslothai/feature/vram-estimation
feat: VRAM-based model filtering in frontend
2026-02-15 12:17:07 -08:00
Shine1i
b8c5ad2839 rm vitest 2026-02-15 21:13:15 +01:00
Shine1i
56461bd9a7 cfg->subset 2026-02-15 21:09:45 +01:00
Shine1i
579e515afd fix hf cfg/split ui 2026-02-15 20:53:59 +01:00
Shine1i
def787e6d4 feat: add confetti fireworks effect on tour completion 2026-02-15 20:25:23 +01:00
Shine1i
78a9a5c8d0 refactor: reorganize tour steps and relocate ReadMore component for improved structure 2026-02-15 20:22:17 +01:00
Shine1i
825fe4b870 refactor: define explicit prop types for GuidedTour and SpotlightOverlay components 2026-02-15 20:17:28 +01:00
imagineer99
26ae7033ce feat: VRAM-based model filtering in frontend 2026-02-15 19:12:28 +00:00
Shine1i
7eb2b91da7 refactor: extract tour utils into separate modules for cleaner structure 2026-02-15 20:11:28 +01:00
Shine1i
721e5e0fc5 tour readmore 2026-02-15 19:58:10 +01:00
Shine1i
a074f5e1c7 tour steps split 2026-02-15 19:57:07 +01:00
Shine1i
ffa9595fbd rm shine + perf 2026-02-15 19:41:15 +01:00
Shine1i
a117d9cf94 tour light card 2026-02-15 19:31:49 +01:00
imagineer99
0ae1a73e46 feat: check dataset configs and splits before hitting check-format 2026-02-15 18:30:54 +00:00
Shine1i
3bba579768 feat: add guided tour component and integrate with Studio UI elements 2026-02-15 19:20:37 +01:00
Shine1i
4da43ae6b1 refactor: streamline chat runtime logic and remove warming indicator
- Replaced `setThreadWarming` logic with streamlined token settlement functions (`settleFirstTokenOk` and `settleFirstTokenErr`) for improved readability and reliability.
- Simplified model loading/unloading functions with reusable `performLoad` and `performUnload` patterns.
- Removed `warmingByThreadId` from runtime store and associated code for reduced complexity.
- Enhanced title generation flow by consolidating logic for persisting and streaming titles.
2026-02-15 18:59:03 +01:00
Shine1i
e02662c309 feat: improve model loading/unloading UX and remove _WarmupIndicator_ from thread UI
- Refactored loading/unloading logic to provide detailed toast notifications with statuses (loading, success, error).
- Removed unused `WarmupIndicator` component from thread UI to simplify interface.
- Introduced better error handling for model refresh and inference tasks.
2026-02-15 18:48:02 +01:00
Shine1i
5aeae854fd feat: conditionally render "Compare" button based on active checkpoint and lora selection, improve fallback title generation, and update default settings 2026-02-15 18:38:25 +01:00
Shine1i
f6397bf1ac feat: add cancelation support for chat generation and streaming tasks 2026-02-15 18:23:27 +01:00
Shine1i
4f1c67bb02 chore: remove unused ComponentExample and associated imports and auto title generate 2026-02-15 18:08:46 +01:00
Shine1i
b707e4096f fix: ensure consistent message order in chat runtime by improving sort logic and adding fallback for createdAt 2026-02-15 17:34:32 +01:00
Shine1i
78c7b6d7ba fix lora: outputs path local 2026-02-15 16:58:24 +01:00
Shine1i
bbee40172c chat compare: send use_adapter 2026-02-15 16:44:14 +01:00
Shine1i
3fff7d2ae8 wip setup: py312 2026-02-15 16:36:53 +01:00
Shine1i
b1d1b61851 fix setup: fish alias, venv no activate 2026-02-15 16:27:44 +01:00
Shine1i
ba09bbfaba merge nightly 2026-02-15 14:52:07 +01:00
Shine1i
2b701fdc51 chore: ignore frontend .omx 2026-02-15 14:50:26 +01:00
Shine1i
3a18ab4e23 feat: add support for event replay and resume in job events API, improve SSE handling, and fix regex patterns in log parsers 2026-02-15 14:49:04 +01:00
Roland Tannous
79ee9f6f2d Merge pull request #96 from unslothai/feature/inference-yaml-ordered
Added the inference defaults for models
2026-02-15 17:43:31 +04:00
Roland Tannous
d6dee37fae Merge pull request #94 from unslothai/fix/pass-save-steps-to-trainer
Adding save-steps to the SFTConfig
2026-02-15 17:25:48 +04:00
Shine1i
265f6350c8 feat: add Data Recipe core functionality with job manager, API routes, and validation services 2026-02-15 13:43:46 +01:00
sshah229
7fd55ce14f resolved the prgress metrics 2026-02-15 05:35:32 -07:00
Shine1i
6244db98d8 feat: remove seed inspect/preview and MCP tools fetch support due to backend endpoint deprecation 2026-02-15 12:45:59 +01:00
sshah229
2483b98985 added the inference fetching from model mappers 2026-02-15 02:48:53 -07:00
Manan17
e672458821 Adding save-steps to the SFTConfig 2026-02-15 09:37:54 +00:00
sshah229
e6bd0a20bb added default inference config for default.yaml 2026-02-15 02:13:24 -07:00
sshah229
a105e60d30 added default inference config from unsloth notebooks 2026-02-15 02:13:24 -07:00
sshah229
81be5dc080 added configs from Ollama 2026-02-15 02:13:24 -07:00
sshah229
9b5e02029e added inference defaults from unsloth guides 2026-02-15 02:13:24 -07:00
Roland Tannous
cbb7bfc74d Merge pull request #93 from unslothai/docs/add-readme
add draft README.md file
2026-02-15 12:51:37 +04:00
Roland Tannous
069953f2c1 README.md draft 2026-02-15 08:49:56 +00:00
Roland Tannous
c866656502 Merge pull request #29 from unslothai/feature/export
Added the export routes and pydantic models
2026-02-15 12:42:01 +04:00
Roland Tannous
8eb0bf47c1 Merge pull request #91 from unslothai/fix/automatic-signup-if-unauthenticated
Auto-redirect to signup/login on stale auth tokens instead of showing 401 spam
2026-02-15 12:30:49 +04:00
Roland Tannous
a035e5af10 fix: auto-redirect to signup/login when auth tokens are stale 2026-02-15 08:27:35 +00:00
Roland Tannous
2c855b7e17 Merge pull request #89 from unslothai/ux/default-signup-tab-on-first-launch
feat: Redirect first-time users to signup page instead of login
2026-02-15 10:45:17 +04:00
Manan Shah
3dcb376790 Merge pull request #88 from unslothai/fix/change-labels-in-data-card
Changing labels in dataset card
2026-02-15 00:38:57 -06:00
Manan17
94dbd9cc9e Changing labels in dataset card 2026-02-15 06:34:39 +00:00
Roland Tannous
d752c31baf feat: redirect first-time users to signup page instead of login 2026-02-15 06:29:52 +00:00
Roland Tannous
5e00badb04 Merge pull request #85 from unslothai/fix/password-hint-length
Fix/password hint length
2026-02-15 10:19:03 +04:00
Roland Tannous
6ff2403356 Merge pull request #83 from unslothai/fix/training-stuck-multiprocessing-cuda
Fixing stuck training processes
2026-02-15 10:18:49 +04:00
Roland Tannous
31c928d568 Merge pull request #86 from unslothai/fix/index-html-cache-headers
Fix: Browser serving stale frontend after rebuild
2026-02-15 10:17:38 +04:00
Manan17
92a1d4cffa Adding hint for password length 2026-02-15 06:12:55 +00:00
Roland Tannous
44f04e067d Remove test_lora.py from tracking 2026-02-15 06:11:06 +00:00
Roland Tannous
9195311b1c fix: add no-cache headers to index.html to prevent stale frontend after rebuild 2026-02-15 06:06:27 +00:00
Manan17
e7c289967e Fixing stuck training processes 2026-02-15 05:40:06 +00:00
Manan17
df5f45058f Fixing stuck training processes 2026-02-15 05:38:06 +00:00
Roland Tannous
1a3da626e2 Merge pull request #81 from unslothai/feature/early-stop-or-cancel-training-ui
feat: early stop or cancel training UI
2026-02-15 08:28:39 +04:00
Manan17
55e7bd60c1 feat: UI for cancel or save and stop training 2026-02-15 00:22:28 +00:00
Manan17
354b7d0aca feat: add cancel or save and stop training 2026-02-15 00:00:22 +00:00
Shine1i
9a014bf9ee feat: enhance sampler builders with datetime unit mapping, uuid format handling, and error reporting 2026-02-14 23:07:11 +01:00
Roland Tannous
21cfd970ba Merge pull request #79 from unslothai/feat/compare-use-adapter
Adapter Toggling for chat compare feature
2026-02-15 00:25:53 +04:00
Roland Tannous
ac8128519d decouple reliance of backend on frontend for is_lora 2026-02-14 20:13:50 +00:00
Roland Tannous
4399687f93 strip extra debug statements 2026-02-14 19:23:51 +00:00
Roland Tannous
4d868e8d2b replace model unloading and peft loading mechanism for compare feature 2026-02-14 19:18:49 +00:00
Shine1i
3cb577bc01 chore: ignore agent.md 2026-02-14 19:22:07 +01:00
Shine1i
5fd2c84a1a feat: refactor block definitions and utilities into modular components for enhanced maintainability 2026-02-14 19:13:19 +01:00
Shine1i
d40e8d444e feat: add seed dataset support with configuration, preview, and builder utilities 2026-02-14 18:44:38 +01:00
Roland Tannous
225b3f1750 del model.peft_config instead of using model.delete_adapter 2026-02-14 17:32:15 +00:00
Roland Tannous
f122154cf3 added print statements for activate_lora_adapter 2026-02-14 17:25:37 +00:00
Roland Tannous
754ccf1a67 swipped logger for print statements as logger isn't propagating 2026-02-14 17:21:26 +00:00
Roland Tannous
b930a17b1d added logging 2026-02-14 17:09:07 +00:00
Roland Tannous
9bee0a3f63 exclude default from model.delete_adapter 2026-02-14 17:03:52 +00:00
Roland Tannous
0b305fd822 _apply_adapter_state now calls revert_to_base_model and activate_lora_adapter properly 2026-02-14 16:57:24 +00:00
Shine1i
81dd8f0abf ignore tests 2026-02-14 16:42:58 +01:00
Shine1i
946953f470 merge nightly 2026-02-14 16:42:20 +01:00
Shine1i
885eb7eea9 lock 2026-02-14 16:37:38 +01:00
Shine1i
ab7107cd72 feat: add Jinja reference autocomplete components and enhance graph edges styling 2026-02-14 16:30:01 +01:00
Roland Tannous
8403bac48d feat(inference): add use_adapter field for per-request adapter toggling in compare mode 2026-02-14 14:52:13 +00:00
Wasim Yousef Said
6f0bdfdbd8 Merge pull request #78 from unslothai/feature/vision-capabilities-chat
feat(chat): add vision image attachments for OpenAI-compatible chat
2026-02-14 02:01:17 -08:00
Shine1i
f424ca73d5 feat: add image handling support with Vision adapter and base64 serialization in chat runtime 2026-02-14 10:59:10 +01:00
Roland Tannous
dc0c69eedb Merge pull request #76 from unslothai/feature/inference-vision-openai-compatible
PR: OpenAI-compatible multimodal vision support + true vision streaming
2026-02-14 13:47:39 +04:00
Roland Tannous
4ab8f81780 migrate _generate_vision_response to use TextIteratorStreamer + background thread 2026-02-14 09:30:32 +00:00
Roland Tannous
480418b595 feat(inference): accept OpenAI multimodal content parts (image_url) in /chat/completions 2026-02-14 09:06:25 +00:00
Roland Tannous
03237e9b45 Merge pull request #72 from unslothai/fix/sse-progress-timeout
Fix: SSE progress stream timeout during training
2026-02-14 09:58:14 +04:00
Roland Tannous
8304060b9f fix: increase SSE progress timeout to 30min and allow step-0 updates 2026-02-14 05:47:22 +00:00
Roland Tannous
be0968bff9 Merge pull request #71 from unslothai/fix/frontend-default-path
Fix/frontend default path
2026-02-14 09:43:24 +04:00
Roland Tannous
59a5f41140 replace function with alias 2026-02-14 05:28:47 +00:00
Roland Tannous
c0123c9b41 fix alias command 2026-02-14 05:24:54 +00:00
Roland Tannous
dc91586662 change line arguments order in setup.sh 2026-02-14 05:13:49 +00:00
Roland Tannous
78e92346fc fix path in run_server 2026-02-14 05:06:17 +00:00
Roland Tannous
a505d3cf98 change default frontend path in run.py to studio/frontend/dist 2026-02-14 05:02:26 +00:00
Roland Tannous
7c52fe4675 Merge pull request #70 from unslothai/feat/wire-custom-format-mapping-to-training
feat: wire `custom_format_mapping` through training pipeline
2026-02-14 01:09:35 +04:00
Roland Tannous
286d5ff0a7 feat: wire custom_format_mapping through training pipeline to format_and_template_dataset 2026-02-13 21:07:36 +00:00
Roland Tannous
3c0bfba143 Merge pull request #69 from unslothai/fix/auto-detect-lora-in-model-config
fix: auto-detect LoRA adapters for both local and remote HF models in ModelConfig
2026-02-14 00:56:34 +04:00
Roland Tannous
5652591d03 fix: auto-detect LoRA adapters for both local and remote HF models in ModelConfig 2026-02-13 20:54:40 +00:00
Roland Tannous
96588e0d65 Merge pull request #68 from unslothai/fix/datasets-fix-vlm-detection
fix: auto-detect multimodal datasets in /check-format without requiri…
2026-02-14 00:04:51 +04:00
Wasim Yousef Said
b4d3b5141d Merge pull request #66 from unslothai/ui-fixes
UI fixes
2026-02-13 11:29:32 -08:00
Wasim Yousef Said
815aaaa947 Merge pull request #67 from unslothai/style/polish-chat-sidebar-spacing
style: polish chat page spacing, typography adjustment, and panel alignment
2026-02-13 11:28:56 -08:00
Manan17
5977d0c794 fixing padding for titles 2026-02-13 19:22:39 +00:00
imagineer99
7f9ca47c1e style: polish chat page spacing, small typography, and panel alignment 2026-02-13 19:18:20 +00:00
Manan17
c02d8df96f Change of font space for title 2026-02-13 19:03:51 +00:00
Roland Tannous
83fecc99ff Merge pull request #65 from unslothai/refactor/change-highlighted-text-color
Refactor/change highlighted text color
2026-02-13 21:36:08 +04:00
Roland Tannous
4e4fc367b6 fix: auto-detect multimodal datasets in /check-format without requiring is_vlm flag 2026-02-13 17:29:39 +00:00
Manan17
5339c11405 Changing the highlighted text color to be black while keeping the checkmark emerald 2026-02-13 17:24:57 +00:00
Wasim Yousef Said
ddfa6c40c6 Merge pull request #63 from unslothai/feature/chat-openai-integration
feat(chat): integrate backend chat runtime + model load flow
2026-02-13 08:47:44 -08:00
Shine1i
95c56ed465 feat: refactor suggestion handling and centralize defaults for thread UI 2026-02-13 17:42:45 +01:00
Shine1i
76830db0cf feat: add warm-up indicator, new thread feature, and runtime improvements in chat UI 2026-02-13 17:28:01 +01:00
Roland Tannous
5c182d293d Merge pull request #62 from unslothai/feature/add-easydict-addict
Feature/add easydict addict
2026-02-13 20:22:46 +04:00
Roland Tannous
045ce145c4 add easydict and addict to setup file 2026-02-13 16:19:55 +00:00
Shine1i
aaa8c1a816 feat: integrate LoRA model management with UI and runtime synchronization 2026-02-13 17:14:49 +01:00
Shine1i
0f7ed648cf feat: refactor chat runtime with modular APIs, state management, and runtime synchronization 2026-02-13 16:45:00 +01:00
Wasim Yousef Said
df8eb64aba Merge pull request #61 from unslothai/feature/training-frontend-integration
training frontend integration + backend sync v2
2026-02-13 05:06:17 -08:00
Shine1i
0ebfb5be76 feat: add support for serialized previews in dataset API and improve training initialization logging 2026-02-13 13:47:17 +01:00
Shine1i
791a06304c feat: add image previews in dataset dialog, enable popularity sorting in model search, refine training config serialization 2026-02-13 13:17:20 +01:00
Shine1i
c50093819f Merge remote-tracking branch 'origin/nightly' into feature/training-frontend-integration 2026-02-13 12:41:09 +01:00
Shine1i
bc5ce0f83b feat: add training feature with state management, API integration, and runtime synchronization 2026-02-13 12:26:28 +01:00
Shine1i
9ee81814cd wip p1 2026-02-13 11:42:19 +01:00
Roland Tannous
5b35f8cff4 Merge pull request #51 from unslothai/feature/print-outbound-interface-address
Show External IP in Startup Banner
2026-02-13 14:32:39 +04:00
Roland Tannous
e9bf6ae368 read external ips with fallback to standard notation 0.0.0.0 2026-02-13 10:28:20 +00:00
Roland Tannous
afa7b3657f feat: show external IP in startup banner 2026-02-13 10:23:12 +00:00
Roland Tannous
a5fe5c7675 Merge pull request #50 from unslothai/fix/auth-setup-rollback
Auth Setup Failure: `auth.db` Created Before Token Generation
2026-02-13 14:14:34 +04:00
Roland Tannous
45973a09e9 fix: rollback auth.db user row if token generation fails during setup 2026-02-13 10:11:07 +00:00
Roland Tannous
03d4b961f6 Merge pull request #49 from unslothai/fix/replace-jwt-with-pyjwt
add pyjwt as dependency. remove jwt. fix AttributeError: module 'jwt'…
2026-02-13 14:00:52 +04:00
Roland Tannous
4e6c5b98db add pyjwt as dependency. remove jwt. fix AttributeError: module 'jwt' has no attribute 'encode' 2026-02-13 09:58:50 +00:00
Roland Tannous
3c6b6c4548 Merge pull request #48 from unslothai/feature/shorten-setup-alias
shorten unsloth-ui alias. auto append frontend dist folder location
2026-02-13 13:57:33 +04:00
Roland Tannous
f953a359d7 shorten unsloth-ui alias. auto append frontend dist folder location 2026-02-13 09:45:47 +00:00
Roland Tannous
2ac129da27 Merge pull request #47 from unslothai/fix/add-jwt-dependency
add jwt dependency to setup.sh
2026-02-13 13:40:19 +04:00
Roland Tannous
0755b6a55c add jwt dependency to setup.sh 2026-02-13 09:39:36 +00:00
Roland Tannous
6fd2ad8924 Merge pull request #46 from unslothai/feature/update-setup-file
Feature/update setup file
2026-02-13 13:33:05 +04:00
Roland Tannous
dd4ee55699 chore: suppress verbose output in setup.sh, show errors only 2026-02-13 09:32:17 +00:00
Roland Tannous
a6ee1a5857 Merge pull request #44 from unslothai/fix/remove-gradio-training
refactor: remove gradio dependency from training backend
2026-02-13 13:26:40 +04:00
Roland Tannous
88f68eaadf refactor: remove gradio dependency from training backend 2026-02-13 09:25:49 +00:00
Roland Tannous
448aa58925 Merge pull request #43 from unslothai/feature/setup-file
Add `setup.sh` for automated environment setup
2026-02-13 13:13:38 +04:00
Roland Tannous
9c6e108784 chore: add setup.sh for automated environment and frontend build 2026-02-13 09:11:07 +00:00
Roland Tannous
110305102c Merge pull request #42 from unslothai/fix/epoch-type-float
Fix: Change `epoch` type from `int` to `float`
2026-02-13 10:53:51 +04:00
Roland Tannous
6beddf9f9e fix: change epoch type from int to float to match TrainerState 2026-02-13 06:51:55 +00:00
Roland Tannous
99aac7c980 Merge pull request #38 from unslothai/fix/model-config-directory
Changed the directory for default configs
2026-02-13 09:20:40 +04:00
Wasim Yousef Said
fa9f5bc53d Merge pull request #35 from unslothai/feature/dataset-preview-table
feat: add dataset viewer using /check-format endpoint
2026-02-12 21:18:36 -08:00
imagineer99
08a76b293f feat: add dataset preview dialog using /check-format endpoint 2026-02-13 05:04:11 +00:00
sshah229
ae0b809adf fixed the script directory 2026-02-12 21:55:36 -07:00
Roland Tannous
9454efad49 Merge pull request #34 from unslothai/feature/openai-chat-completions
PR: OpenAI-Compatible Chat Completions Endpoint
2026-02-12 23:20:52 +04:00
Roland Tannous
c78cb11f81 feat: add OpenAI-compatible POST /chat/completions endpoint with streaming and non-streaming support 2026-02-12 19:00:05 +00:00
Roland Tannous
dcd88bf525 Merge pull request #33 from unslothai/feature/sse-connection-resilience
feat: SSE Connection Resilience
2026-02-12 22:03:20 +04:00
Roland Tannous
d17c1b99d8 feat: add SSE reconnection resilience with spec-compliant event fields, Last-Event-ID resume, and metric_history fallback in /status 2026-02-12 17:58:48 +00:00
Roland Tannous
0caad17134 Merge pull request #32 from unslothai/feature/datasets-endpoint-preview-samples
Return Raw Preview Samples on Format Detection Failure
2026-02-12 19:53:13 +04:00
Roland Tannous
9afce629c4 untrack package-lock.json and add to gitignore 2026-02-12 15:41:20 +00:00
Roland Tannous
a2c7f1b1b8 return raw preview samples on format detection failure for manual column mapping 2026-02-12 15:39:56 +00:00
Roland Tannous
3039b314e4 Merge pull request #31 from unslothai/feature/datasets-endpoint-return-top-10
Optimize `/check-format` to return preview samples
2026-02-12 15:26:13 +04:00
Roland Tannous
f780b0db43 feat(datasets): check-format to return preview samples 2026-02-12 11:25:47 +00:00
Shine1i
b24dea5e99 feat: add builders and components for LLM configuration in Recipe Studio and refactor for readability, preparing for draft 2026-02-12 04:25:15 +01:00
sshah229
e4b073985f added router in main 2026-02-11 18:51:53 -07:00
sshah229
46cc71f310 added the pydantic models and routes for export 2026-02-11 18:34:12 -07:00
Shine1i
49be56181f feat: implement Data Recipes page feature subfolders for workflow management and saving logic 2026-02-12 02:07:53 +01:00
Shine1i
6e752266d8 feat: add Recipe Studio utilities and components for configuring synthetic data pipelines 2026-02-12 01:03:47 +01:00
Shine1i
1e0cb0ecb0 chore: rename Canvas Lab components and utilities 2026-02-12 00:39:08 +01:00
Shine1i
49abc27533 feat: add interactive viewport controls and refactor floating button styles
- Introduced `ViewportControls` for zoom, fit view, and interactive toggle in canvas lab.
- Extracted and reused `CANVAS_FLOATING_ICON_BUTTON_CLASS` for consistent button styling.
- Updated API base paths and server proxy settings.
- Enabled dynamic interaction states for nodes and connections in canvas lab.
2026-02-12 00:18:56 +01:00
shine1i
131f07c656 Merge remote-tracking branch 'origin/nightly' into feature/canvas-lab
# Conflicts:
#	.gitignore
#	studio/frontend/.gitignore
#	studio/frontend/bun.lock
#	studio/frontend/src/app/router.tsx
2026-02-11 22:36:34 +01:00
Roland Tannous
8d65d66b90 Merge pull request #28 from unslothai/refactor/centralize-device-selection-and-gpu-cache
[MLX] - Centralize Device Selection & GPU Cache Management
2026-02-11 20:59:23 +04:00
Roland Tannous
a6ee9ee957 use get_device() for device selection and clear_gpu_cache() for GPU memory cleanup in inference, trainer, and export 2026-02-11 16:56:52 +00:00
Roland Tannous
d4cbddc638 Merge pull request #27 from unslothai/feature/implement-silicon-utils-compatibility
[MLX] Add Hardware Detection Module & Apple Silicon (MLX) Compatibility
2026-02-11 20:21:08 +04:00
Roland Tannous
8395652f59 added @needs_torch to test_cuda_oom 2026-02-11 16:12:37 +00:00
Roland Tannous
b618ea1f9f add @needs_mlx decorator on tests 2026-02-11 16:10:22 +00:00
Roland Tannous
e31d4a3c40 replace torch MPS with MLX 2026-02-11 16:04:35 +00:00
Roland Tannous
be02fac439 reset DEVICE type on fastapi lifespan exit 2026-02-11 15:58:13 +00:00
Roland Tannous
349f18779c fixed tests to be hardware specific 2026-02-11 15:40:00 +00:00
Roland Tannous
220bcb011e fixed tests to be hardware specific 2026-02-11 15:37:34 +00:00
Roland Tannous
a579a3d4ea integrate global hardware detection at lifespan entrypoint 2026-02-11 15:34:26 +00:00
Roland Tannous
432c99ee7a feat: add Apple Silicon (MPS) compatibility to backend utils + tests 2026-02-11 14:00:39 +00:00
Wasim Yousef Said
9bc2f219f9 Merge pull request #23 from unslothai/feature/auth-ui
auth setup for the client and auth guard checks
2026-02-11 05:05:07 -08:00
shine1i
2a2ff35f76 drop docs file 2026-02-11 14:03:45 +01:00
shine1i
1bf7f49178 feat: auth guard on routes 2026-02-11 14:01:30 +01:00
Roland Tannous
524007caa1 Merge pull request #26 from unslothai/fix/fix-existing-routes-models
Fix: Move Inline Pydantic Models & Add Response Models for Routes
2026-02-11 16:42:25 +04:00
shine1i
df252be49c feat: new auth and refresh token on unauthorized 2026-02-11 13:40:33 +01:00
Roland Tannous
5ae20f6099 move inline pydantic models - fix existing models routes integration 2026-02-11 12:39:58 +00:00
Roland Tannous
4be4fcd5ed Merge pull request #25 from unslothai/feature/remove-unsloth-compiled-cache-lifespan-exit
Remove `unsloth_compiled_cache` on FastAPI Lifespan Exit
2026-02-11 16:31:57 +04:00
Roland Tannous
8d68625ce3 remove unsloth_compiled_cache folder on fastapi lifespan exit 2026-02-11 12:30:05 +00:00
shine1i
a9587e0a53 Merge remote-tracking branch 'origin/nightly' into feature/auth-ui 2026-02-11 13:29:11 +01:00
Roland Tannous
1f8ae108bb chore: untrack auth.db (already in .gitignore) 2026-02-11 12:21:54 +00:00
Roland Tannous
6a40dc3ad9 Merge pull request #24 from unslothai/feature/refactor-authentication-mechanism
Feature/refactor authentication mechanism
2026-02-11 16:13:44 +04:00
Roland Tannous
528d2e27f0 authentication refactor - added setup token and token refresh mechanism 2026-02-11 12:09:47 +00:00
shine1i
2a1b6eae1a ignore claude, test folder and docs for arch of canvas-lab 2026-02-10 17:39:41 +01:00
shine1i
a86271c967 refactor: consolidate AvailableVariables component and enhance variable display logic across dialogs
- Moved `AvailableVariables` to shared directory.
- Updated dialogs to use shared `AvailableVariables` component.
- Enhanced inline expressions and processors dialog with better variable display.
2026-02-09 20:07:41 +01:00
shine1i
79614f0066 add variable handling components and refactor inputs across dialogs
- Introduce `AvailableVariables` for displaying variables linked to configs.
- Implement `ChipInput` for dynamic value management in category and subcategory dialogs.
- Add `AuxVariableBadges` to aux nodes for displaying variable references.
- Update inline components with comboboxes for better user experience.
- Replace badges and manual inputs with streamlined reusable components.
2026-02-09 19:48:42 +01:00
shine1i
479c1b466d auth ui flow 2026-02-07 16:14:02 +01:00
shine1i
b708ebb84c merge nightly 2026-02-07 14:30:46 +01:00
Roland Tannous
2021bfd6d0 Merge pull request #22 from unslothai/feature/auth
Added jwt authentication
2026-02-07 14:27:35 +04:00
sshah229
6e5cd50c34 fixed the errors- renamed jwt to authentication, used raw jwt, and removed search route 2026-02-07 03:14:30 -07:00
shine1i
f34461509a inline sizes, aux nodes resize, and auto layout keep nodes close logic 2026-02-06 13:18:18 +01:00
shine1i
0e585d5ac7 cleanup and restctucture 2026-02-06 12:54:55 +01:00
shine1i
e7d8b55948 decouple aux nodes and text dom for aux nodes 2026-02-06 12:12:32 +01:00
shine1i
b1445febdb fix edfe desync 2026-02-06 11:47:29 +01:00
shine1i
e0404966d7 ui buttons move, squircle boxes, and resize 2026-02-06 11:28:32 +01:00
sshah229
be995392ce Merge branch 'feature/auth' of https://github.com/unslothai/new-ui-prototype into feature/auth 2026-02-06 03:19:22 -07:00
sshah229
f9f5dd4dcb refactored the code for username/password and added pydantic models and routes for the same 2026-02-06 03:15:30 -07:00
sshah229
fc673227b7 Refactored the training and model routes and added the jwt authentication 2026-02-06 03:15:30 -07:00
sshah229
1d69afc643 refactored the code for username/password and added pydantic models and routes for the same 2026-02-06 02:56:54 -07:00
shine1i
ac3e60138f inline dialogs and react flow ui refactor WIP p1 2026-02-06 00:42:35 +01:00
shine1i
d321c9303b refactor of payload files 2026-02-05 23:41:27 +01:00
shine1i
3666241611 processors and drop column 2026-02-05 22:26:48 +01:00
shine1i
64fa884b7f new blocks timedelta, and some tweaks 2026-02-05 21:55:50 +01:00
shine1i
ba205e8ff6 model config and provider fixes and inline dialog 2026-02-05 20:55:39 +01:00
shine1i
a348bc76ab feat: Model Provider and Model config 2026-02-05 12:20:11 +01:00
shine1i
27c7f3a5b2 sheet icons and llm judge 2026-02-05 11:38:11 +01:00
shine1i
70acbd1404 handle layouting 2026-02-04 17:21:25 +01:00
shine1i
ca550f93d8 straight lines 2026-02-04 16:37:42 +01:00
shine1i
84e7d570ca convert to, lines and fixes 2026-02-04 16:33:42 +01:00
shine1i
d29643dbb6 refactor: centralize block definitions and dialogs into registry, streamline node updates using helper utilities 2026-02-04 15:42:46 +01:00
shine1i
72be93e9b5 save and import, and fixes 2026-02-04 14:32:49 +01:00
shine1i
af2a47dbd9 import export 2026-02-04 14:22:03 +01:00
shine1i
f40f843133 sheet tidy 2026-02-04 14:11:09 +01:00
shine1i
682fbe3872 canvaslab v1 2026-02-04 14:06:38 +01:00
sshah229
d9057e4aaa Refactored the training and model routes and added the jwt authentication 2026-02-04 05:49:29 -07:00
Wasim Yousef Said
a2704904b9 Merge pull request #21 from unslothai/feature/cleanup
biome fixes, and linter fixes for some issues, and some readibility changes
2026-02-04 04:33:06 -08:00
shine1i
3e8cb93ac3 cleanup 2026-02-04 13:28:39 +01:00
shine1i
48e4705091 add canvaslab 2026-02-04 13:22:41 +01:00
Roland Tannous
dc2a544eb3 Merge pull request #20 from unslothai/feature/datasets-endpoint
Add Datasets Check-Format Endpoint
2026-02-04 00:45:31 +04:00
Roland Tannous
996b16f9ee Add datasets check-format endpoint 2026-02-03 20:42:25 +00:00
Roland Tannous
645e229678 Merge pull request #19 from unslothai/fix/dataset-utils-custom-mapping
fix custom_format_mapping flow for manual column mapping
2026-02-03 22:43:06 +04:00
Roland Tannous
4d89dd302c fix custom_format_mapping flow for manual column mapping 2026-02-03 18:42:07 +00:00
Roland Tannous
b80cdd9465 Merge pull request #18 from unslothai/refactor/add-dataset-detection-status-flag
Add `requires_manual_mapping` Flag for Dataset Detection
2026-02-03 22:22:50 +04:00
Roland Tannous
fa3724b82c Add Flag for Dataset Detection 2026-02-03 18:21:05 +00:00
Roland Tannous
bd0a00df14 Merge pull request #17 from unslothai/fix/refactor-dataset-utils-part2
Fix/refactor dataset utils part2
2026-02-03 22:04:03 +04:00
Roland Tannous
842b2b3186 remove duplicates from dataset_utils.py 2026-02-03 18:03:01 +00:00
Roland Tannous
f453330f7b Merge pull request #16 from unslothai/refactor/inference-api-routes-part-1
refactor/inference-api-routes-part-1
2026-02-03 21:00:18 +04:00
Roland Tannous
c17ba10f96 refactor/inference-api-routes-part-1 2026-02-03 16:57:57 +00:00
Roland Tannous
dcc5322036 Merge pull request #15 from unslothai/enhance/refactor-dataset-utils
Refactor `dataset_utils.py` into focused modules
2026-02-03 18:40:53 +04:00
Roland Tannous
47ead076cf Refactor [dataset_utils.py](cci:7://file:///home/support/new-ui-prototype/studio/backend/utils/datasets/dataset_utils.py:0:0-0:0) into focused modules 2026-02-03 14:38:02 +00:00
Roland Tannous
1b3a253ac6 Merge pull request #14 from unslothai/feature/pydantic-models-update
Feature/pydantic models update
2026-02-03 14:47:12 +04:00
Roland Tannous
5b07c51eb8 add grad_norm and num_tokens to TrainingProgress response object 2026-02-03 10:35:58 +00:00
Roland Tannous
a440112294 delete tmp directory 2026-02-02 20:02:18 +00:00
Roland Tannous
00fa9e273e update pydantic models for Models and Training routes 2026-02-02 20:00:23 +00:00
Roland Tannous
d7d3a5a9a5 update pydantic models for Models and Training routes 2026-02-02 20:00:04 +00:00
Roland Tannous
e390ca1092 fix: add utils/models directory that was ignored by gitignore 2026-02-02 19:52:34 +00:00
Roland Tannous
3463311bca fix: restore models directory files deleted during restructure 2026-02-02 19:36:30 +00:00
Roland Tannous
63f5c72745 Merge pull request #11 from unslothai/fix/move-claude-file-to-frontend
moved CLAUDE.md into frontend directory
2026-02-02 22:25:52 +04:00
Roland Tannous
bdf0b04c90 moved CLAUDE.md into frontend directory 2026-02-02 18:25:11 +00:00
Roland Tannous
0698b43913 Merge pull request #10 from unslothai/feature/add-model-training-yaml-configs
added model yaml config files
2026-02-02 22:23:38 +04:00
Roland Tannous
0ec1139f92 added model yaml config files 2026-02-02 18:22:14 +00:00
Roland Tannous
543ec56916 Merge pull request #9 from unslothai/fix/remove-backend-backend-redundant-folder
remove redundant backend.backend folder
2026-02-02 22:04:38 +04:00
Roland Tannous
9087892afc remove redundant backend.backend folder 2026-02-02 18:03:56 +00:00
Roland Tannous
4d26e24eb3 migrated cli. fixed imports. fixed unsloth studio command logic 2026-02-02 17:50:11 +00:00
Roland Tannous
5f00a95295 Merge cli from ui-early-access and fix imports 2026-02-02 17:23:30 +00:00
Roland Tannous
b306a3f923 Merge pull request #8 from unslothai/feature/frontendui-export-page-client-rebased
feat: Add export page, HF model/dataset search, PDF/DOCX extraction logic, modern AUI API, and code cleanup
2026-02-02 19:55:54 +04:00
shine1i
41a39b561f refactor: update quantization options in export constants, remove unused entries, and add F32 option 2026-02-02 16:49:07 +01:00
shine1i
6446aa6535 feat: add DOCX attachment support using mammoth, extend attachment handling to process and extract text from DOCX files 2026-02-02 16:33:10 +01:00
shine1i
aba9a4f4b4 feat: add PDF attachment support using unpdf, extend attachment handling and runtime to process and extract text from PDFs 2026-02-02 16:11:39 +01:00
shine1i
af72331abb refactor: enhance chat and UI elements with animations, tooltips, and improved styling; streamline sidebar, navbar, and chat-page interactions in top bar 2026-02-02 15:25:15 +01:00
shine1i
763b96898e refactor: replace depreceated useAssistantRuntime with useAui, update runtime API calls across chat features for consistency 2026-02-02 15:03:01 +01:00
shine1i
9d926395ac refactor: remove unused components, mock data, and redundant logic across chat features; streamline settings and runtime handling for better maintainability 2026-02-02 14:52:58 +01:00
shine1i
e491790a55 refactor: remove unused model and dataset configurations, simplify export-page logic by eliminating modelInfo dependency and redundant params display 2026-02-02 14:22:35 +01:00
shine1i
b8b0faea3c refactor: streamline combobox logic, improve search handling, and remove unused elements across model and dataset sections 2026-02-02 14:06:34 +01:00
shine1i
45df407b78 refactor: simplify model and dataset combobox logic, remove curated items, and streamline search handling across components 2026-02-02 13:16:08 +01:00
shine1i
e423174c0b refactor: format and clean up imports, hooks, and UI components for consistent structure and readability across models and datasets sections 2026-02-02 12:51:04 +01:00
shine1i
bbf8b4ffbe feat: add Hugging Face search integration for datasets and models, extend infinite scroll support, and improve UI components with animations and tooltips 2026-02-02 12:45:41 +01:00
shine1i
51f5b5f262 feat: replace config summary with model export feature, including export methods, quantization options, and new UI components 2026-02-02 11:08:31 +01:00
Roland Tannous
04f800ec75 Merge pull request #7 from unslothai/fix/restructure-repo-root
Add studio root folder and make frontend and backend as subfolders
2026-02-02 13:18:20 +04:00
Roland Tannous
e428e7a5d0 add studio root folder 2026-02-02 09:14:35 +00:00
Roland Tannous
75d8dcc824 root studio folder 2026-02-02 09:13:49 +00:00
Roland Tannous
96108fdfd0 Merge pull request #6 from unslothai/fix/remove-backend-backend-directory
Fix/remove backend backend directory
2026-02-02 10:35:50 +04:00
Roland Tannous
2228c88cfc remove redundant backend.backend directory 2026-02-02 06:35:00 +00:00
Roland Tannous
dd12f9013a Merge pull request #5 from unslothai/feature/backend-core-restructuring
backend restructuring and housekeeping
Changes made:

- Moved all files from backend/backend/ → backend/core/ with nested subdirectories
- Created init.py for each submodule with proper exports
- Updated all imports in routes (routes/training.py, routes/models.py)
- Updated internal relative imports to use .. for parent references
- Deleted old backend/backend/ directory
- Moved shared modules (path_utils.py , model_config.py) to utils/ subfolder
2026-02-02 09:56:59 +04:00
Roland Tannous
359e6d21b1 Merge branch 'nightly' into feature/backend-core-restructuring 2026-02-02 09:56:19 +04:00
Roland Tannous
9a606d8fe8 merge conflict .gitignore 2026-02-02 05:53:43 +00:00
Roland Tannous
75bd759108 fix .gitignore merge conflict 2026-02-02 05:51:25 +00:00
Roland Tannous
023405c76a backend restructuring and housekeeping 2026-02-02 05:48:09 +00:00
Roland Tannous
d402dc371c Merge pull request #4 from unslothai/feature/backend-draft
Pushing the initial draft of the backend
2026-02-02 09:33:01 +04:00
sshah229
c042223a7a moved utils, dataset_utilsand datasets, updated the startTraining pydantic model 2026-02-01 16:49:42 -07:00
Roland Tannous
5afded027f Merge pull request #3 from unslothai/feature/frontendui-onboarding-dashboard
feat: onboarding & dashboard UI
2026-02-01 14:00:54 +04:00
sshah229
d593b069e2 Added the training and models routes 2026-02-01 01:23:16 -07:00
shine1i
773308b3a8 feat: track and display reasoning duration, enhance runtime with adapter for copying during inference and edit and UI integration 2026-02-01 09:08:23 +01:00
shine1i
465b95a7a1 refactor: improve reasoning UI with animations and dynamic behavior, minor CSS and layout tweaks 2026-02-01 08:31:22 +01:00
shine1i
89a5f5259b refactor: chat input bg with fade, reuse it in composer view as well 2026-02-01 08:09:17 +01:00
shine1i
8378e3fa8f refactor: migrate chat sidebar and UI components to modular sidebar framework, some minor UI tweaks (sidebar, lines) 2026-02-01 07:50:53 +01:00
shine1i
8342caa796 chore: update labels and UI minor adjustments for clarity 2026-02-01 06:57:15 +01:00
shine1i
dbb8ec17c3 feat: add frontend UI codebase 2026-01-31 19:34:16 +01:00
Roland Tannous
a30967a69c added __init__.py for backend 2026-01-31 08:38:29 +00:00
Roland Tannous
0ef09af008 git repo skeleton structure 2026-01-31 08:27:01 +00:00
Roland Tannous
b5aa137b7f first commit 2026-01-27 21:19:48 +04:00
Roland Tannous
affd52e868 Merge pull request #49 from unslothai/feature/default-param-yaml
Yaml config for default parameters
2026-01-22 05:42:42 +04:00
sshah229
30c75e6d41 fixed parameters (finetune language, vision, attention layers, and mlp_modules) not updating 2026-01-21 02:40:25 -07:00
Roland Tannous
02982ceeba set create public gradio share link to true 2026-01-20 07:36:57 +00:00
Roland Tannous
32e72a12ae add studio command line argument to start unsloth studio UI 2026-01-20 07:27:05 +00:00
Dan Saunders
f47ebfd237 CLI command for UI 2026-01-01 13:50:22 -05:00
Dan Saunders
44104fa83d review comments 2025-12-17 15:28:03 -05:00
Dan Saunders
7833191626 review comments 2025-12-17 15:22:42 -05:00
Dan Saunders
e012936d75 nits 2025-12-15 18:46:21 -05:00
Dan Saunders
64a13cd4b5 vision config -> lora 2025-12-15 18:37:26 -05:00
Dan Saunders
1a929732f6 bugfix 2025-12-15 18:37:26 -05:00
Dan Saunders
e79b1c7832 review comments, tests, etc. 2025-12-15 18:37:26 -05:00
Dan Saunders
6e7e52fb26 add export command, nested reorg commands 2025-12-15 18:37:26 -05:00
Dan Saunders
7828f77175 fixes / cleanup 2025-12-15 18:37:26 -05:00
Dan Saunders
cf966fe98e autogen typer options from pydantic models 2025-12-15 18:37:26 -05:00
Dan Saunders
356fb08b03 add dry run 2025-12-15 18:37:26 -05:00
Dan Saunders
22f9a65772 refactor 2025-12-15 18:37:26 -05:00
Dan Saunders
4ef25032c1 add config support + example configs, etc. 2025-12-15 18:37:26 -05:00
Dan Saunders
42490cfbc4 train CLI 2025-12-15 18:37:26 -05:00
654 changed files with 102170 additions and 4 deletions

7
cli.py Normal file
View file

@ -0,0 +1,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
from cli import app
if __name__ == "__main__":
app()

22
cli/__init__.py Normal file
View file

@ -0,0 +1,22 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import typer
from cli.commands.train import train
from cli.commands.inference import inference
from cli.commands.export import export, list_checkpoints
from cli.commands.ui import ui
from cli.commands.studio import studio_app
app = typer.Typer(
help = "Command-line interface for Unsloth training, inference, and export.",
context_settings = {"help_option_names": ["-h", "--help"]},
)
app.command()(train)
app.command()(inference)
app.command()(export)
app.command("list-checkpoints")(list_checkpoints)
app.command()(ui)
app.add_typer(studio_app, name = "studio", help = "Unsloth Studio commands.")

2
cli/commands/__init__.py Normal file
View file

@ -0,0 +1,2 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0

132
cli/commands/export.py Normal file
View file

@ -0,0 +1,132 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
from pathlib import Path
from typing import Optional
import typer
EXPORT_FORMATS = ["merged-16bit", "merged-4bit", "gguf", "lora"]
GGUF_QUANTS = ["q4_k_m", "q5_k_m", "q8_0", "f16"]
def list_checkpoints(
outputs_dir: Path = typer.Option(
Path("./outputs"), "--outputs-dir", help = "Directory that holds training runs."
),
):
"""List checkpoints detected in the outputs directory."""
from studio.backend.core.export import ExportBackend
backend = ExportBackend()
checkpoints = backend.scan_checkpoints(outputs_dir = str(outputs_dir))
if not checkpoints:
typer.echo("No checkpoints found.")
raise typer.Exit()
for model_name, ckpt_list, metadata in checkpoints:
typer.echo(f"\n{model_name}:")
for display, path, loss in ckpt_list:
loss_str = f" (loss: {loss:.4f})" if loss is not None else ""
typer.echo(f" {display}{loss_str}: {path}")
def export(
checkpoint: Path = typer.Argument(..., help = "Path to checkpoint directory."),
output_dir: Path = typer.Argument(..., help = "Directory to save exported model."),
format: str = typer.Option(
"merged-16bit",
"--format",
"-f",
help = f"Export format: {', '.join(EXPORT_FORMATS)}",
),
quantization: str = typer.Option(
"q4_k_m",
"--quantization",
"-q",
help = f"GGUF quantization method: {', '.join(GGUF_QUANTS)}",
),
push_to_hub: bool = typer.Option(
False, "--push-to-hub", help = "Push exported model to HuggingFace Hub."
),
repo_id: Optional[str] = typer.Option(
None, "--repo-id", help = "HuggingFace repo ID (username/model-name)."
),
hf_token: Optional[str] = typer.Option(
None, "--hf-token", envvar = "HF_TOKEN", help = "HuggingFace token."
),
private: bool = typer.Option(
False, "--private", help = "Make the HuggingFace repo private."
),
max_seq_length: int = typer.Option(2048, "--max-seq-length"),
load_in_4bit: bool = typer.Option(True, "--load-in-4bit/--no-load-in-4bit"),
):
"""Export a checkpoint to various formats (merged, GGUF, LoRA adapter)."""
if format not in EXPORT_FORMATS:
typer.echo(
f"Error: Invalid format '{format}'. Choose from: {', '.join(EXPORT_FORMATS)}",
err = True,
)
raise typer.Exit(code = 2)
if push_to_hub and not repo_id:
typer.echo("Error: --repo-id required when using --push-to-hub", err = True)
raise typer.Exit(code = 2)
from studio.backend.core.export import ExportBackend
backend = ExportBackend()
typer.echo(f"Loading checkpoint: {checkpoint}")
success, message = backend.load_checkpoint(
checkpoint_path = str(checkpoint),
max_seq_length = max_seq_length,
load_in_4bit = load_in_4bit,
)
if not success:
typer.echo(f"Error: {message}", err = True)
raise typer.Exit(code = 1)
typer.echo(message)
typer.echo(f"Exporting as {format}...")
if format == "merged-16bit":
success, message = backend.export_merged_model(
save_directory = str(output_dir),
format_type = "16-bit (FP16)",
push_to_hub = push_to_hub,
repo_id = repo_id,
hf_token = hf_token,
private = private,
)
elif format == "merged-4bit":
success, message = backend.export_merged_model(
save_directory = str(output_dir),
format_type = "4-bit (FP4)",
push_to_hub = push_to_hub,
repo_id = repo_id,
hf_token = hf_token,
private = private,
)
elif format == "gguf":
success, message = backend.export_gguf(
save_directory = str(output_dir),
quantization_method = quantization.upper(),
push_to_hub = push_to_hub,
repo_id = repo_id,
hf_token = hf_token,
)
elif format == "lora":
success, message = backend.export_lora_adapter(
save_directory = str(output_dir),
push_to_hub = push_to_hub,
repo_id = repo_id,
hf_token = hf_token,
private = private,
)
if not success:
typer.echo(f"Error: {message}", err = True)
raise typer.Exit(code = 1)
typer.echo(message)

69
cli/commands/inference.py Normal file
View file

@ -0,0 +1,69 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import sys
from typing import Optional
import typer
def inference(
model: str = typer.Argument(..., help = "HF model id or local path."),
prompt: str = typer.Argument(..., help = "Prompt to send to the model."),
hf_token: Optional[str] = typer.Option(
None, "--hf-token", envvar = "HF_TOKEN", help = "Hugging Face token if needed."
),
temperature: float = typer.Option(0.7, "--temperature"),
top_p: float = typer.Option(0.9, "--top-p"),
top_k: int = typer.Option(40, "--top-k"),
max_new_tokens: int = typer.Option(256, "--max-new-tokens"),
repetition_penalty: float = typer.Option(1.1, "--repetition-penalty"),
system_prompt: str = typer.Option(
"",
"--system-prompt",
help = "Optional system prompt to prepend.",
),
max_seq_length: int = typer.Option(2048, "--max-seq-length"),
load_in_4bit: bool = typer.Option(True, "--load-in-4bit/--no-load-in-4bit"),
):
"""Run a single inference using the specified model."""
from studio.backend.core import ModelConfig, get_inference_backend
inference_backend = get_inference_backend()
model_config = ModelConfig.from_ui_selection(
dropdown_value = model, search_value = None, hf_token = hf_token, is_lora = False
)
if not model_config:
typer.echo("Could not resolve model config", err = True)
raise typer.Exit(code = 1)
if not inference_backend.load_model(
config = model_config,
max_seq_length = max_seq_length,
load_in_4bit = load_in_4bit,
hf_token = hf_token,
):
typer.echo("Model load failed", err = True)
raise typer.Exit(code = 1)
messages = [{"role": "user", "content": prompt}]
stream = inference_backend.generate_chat_response(
messages = messages,
system_prompt = system_prompt,
temperature = temperature,
top_p = top_p,
top_k = top_k,
max_new_tokens = max_new_tokens,
repetition_penalty = repetition_penalty,
)
typer.echo("Assistant:", nl = True)
previous = ""
for chunk in stream:
delta = chunk[len(previous) :]
if delta:
sys.stdout.write(delta)
sys.stdout.flush()
previous = chunk
sys.stdout.write("\n")
sys.stdout.flush()

383
cli/commands/studio.py Normal file
View file

@ -0,0 +1,383 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import os
import platform
import subprocess
import sys
import time
from pathlib import Path
from typing import Optional
import typer
studio_app = typer.Typer(help = "Unsloth Studio commands.")
STUDIO_HOME = Path.home() / ".unsloth" / "studio"
# __file__ is cli/commands/studio.py — two parents up is the package root
# (either site-packages or the repo root for editable installs).
_PACKAGE_ROOT = Path(__file__).resolve().parent.parent.parent
def _is_repo_root(path: Path) -> bool:
"""Check if a directory looks like the repo root (actual git clone, not site-packages)."""
return (
(path / ".git").exists()
and (path / "pyproject.toml").is_file()
and (
(path / "studio" / "setup.sh").is_file()
or (path / "studio" / "setup.ps1").is_file()
)
)
def _get_repo_root() -> Optional[Path]:
"""Find the git clone repo root.
Used only by setup() checks __file__ first (editable install),
then walks CWD parents (wheel install, user is inside the clone).
"""
# Check 1: __file__ is in the repo (editable install)
if _is_repo_root(_PACKAGE_ROOT):
return _PACKAGE_ROOT
# Check 2: CWD or any parent is the repo
cwd = Path.cwd().resolve()
for parent in (cwd, *cwd.parents):
if _is_repo_root(parent):
return parent
return None
def _studio_venv_python() -> Optional[Path]:
"""Return the studio venv Python binary, or None if not set up."""
if platform.system() == "Windows":
p = STUDIO_HOME / ".venv" / "Scripts" / "python.exe"
else:
p = STUDIO_HOME / ".venv" / "bin" / "python"
return p if p.is_file() else None
def _find_run_py() -> Optional[Path]:
"""Find studio/backend/run.py.
No CWD dependency works from any directory.
Since studio/ is now a proper package (has __init__.py), it lives in
site-packages after pip install, right next to cli/.
"""
# 1. Relative to __file__ (site-packages or editable repo root)
run_py = _PACKAGE_ROOT / "studio" / "backend" / "run.py"
if run_py.is_file():
return run_py
# 2. Studio venv's site-packages (Linux + Windows layouts)
for pattern in (
"lib/python*/site-packages/studio/backend/run.py",
"Lib/site-packages/studio/backend/run.py",
):
for match in (STUDIO_HOME / ".venv").glob(pattern):
return match
return None
def _find_install_script() -> Optional[Path]:
"""Find studio/install_python_stack.py.
No CWD dependency works from any directory.
"""
# 1. Relative to __file__ (site-packages or editable repo root)
s = _PACKAGE_ROOT / "studio" / "install_python_stack.py"
if s.is_file():
return s
# 2. Studio venv's site-packages
for pattern in (
"lib/python*/site-packages/studio/install_python_stack.py",
"Lib/site-packages/studio/install_python_stack.py",
):
for match in (STUDIO_HOME / ".venv").glob(pattern):
return match
return None
def _find_setup_script() -> Optional[Path]:
"""Find studio/setup.sh or studio/setup.ps1.
No CWD dependency works from any directory.
"""
name = "setup.ps1" if platform.system() == "Windows" else "setup.sh"
# 1. Relative to __file__ (site-packages or editable repo root)
s = _PACKAGE_ROOT / "studio" / name
if s.is_file():
return s
# 2. Studio venv's site-packages
for pattern in (
f"lib/python*/site-packages/studio/{name}",
f"Lib/site-packages/studio/{name}",
):
for match in (STUDIO_HOME / ".venv").glob(pattern):
return match
return None
# ── unsloth studio (server) ──────────────────────────────────────────
@studio_app.callback(invoke_without_command = True)
def studio_default(
ctx: typer.Context,
port: int = typer.Option(8000, "--port", "-p"),
host: str = typer.Option("0.0.0.0", "--host", "-H"),
frontend: Optional[Path] = typer.Option(None, "--frontend", "-f"),
silent: bool = typer.Option(False, "--silent", "-q"),
):
"""Launch the Unsloth Studio server."""
if ctx.invoked_subcommand is not None:
return
# Always use the studio venv if it exists and we're not already in it
studio_venv_dir = STUDIO_HOME / ".venv"
in_studio_venv = sys.prefix.startswith(str(studio_venv_dir))
if not in_studio_venv:
studio_python = _studio_venv_python()
run_py = _find_run_py()
if studio_python and run_py:
if not silent:
typer.echo("Launching with studio venv...")
args = [
str(studio_python),
str(run_py),
"--host",
host,
"--port",
str(port),
]
if frontend:
args.extend(["--frontend", str(frontend)])
if silent:
args.append("--silent")
os.execvp(str(studio_python), args)
else:
typer.echo("Studio not set up. Run 'unsloth studio setup' first.")
raise typer.Exit(1)
from studio.backend.run import run_server
if not silent:
from studio.backend.run import _resolve_external_ip
display_host = _resolve_external_ip() if host == "0.0.0.0" else host
typer.echo(f"Starting Unsloth Studio on http://{display_host}:{port}")
run_server(
host = host,
port = port,
frontend_path = frontend,
silent = silent,
)
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
typer.echo("\nShutting down...")
# ── unsloth studio setup ─────────────────────────────────────────────
@studio_app.command()
def setup():
"""Run one-time Studio environment setup."""
# If we're inside a git clone, use the full setup script (builds frontend, etc.)
repo = _get_repo_root()
if repo:
_dev_setup(repo)
else:
_pip_setup()
def _dev_setup(repo_root: Path):
"""Git-clone: run setup.sh / setup.ps1."""
studio_dir = repo_root / "studio"
if platform.system() == "Windows":
script = studio_dir / "setup.ps1"
subprocess.run(
["powershell", "-ExecutionPolicy", "Bypass", "-File", str(script)],
check = True,
)
else:
script = studio_dir / "setup.sh"
subprocess.run(["bash", str(script)], check = True)
def _pip_setup():
"""Pip-install: create studio venv, install all deps, build extras."""
import venv as _venv
venv_dir = STUDIO_HOME / ".venv"
venv_t5_dir = STUDIO_HOME / ".venv_t5"
if platform.system() == "Windows":
venv_python = venv_dir / "Scripts" / "python.exe"
venv_pip = venv_dir / "Scripts" / "pip.exe"
else:
venv_python = venv_dir / "bin" / "python"
venv_pip = venv_dir / "bin" / "pip"
typer.echo("Setting up Unsloth Studio...")
# 1. Create venv
if not venv_python.is_file():
typer.echo(f" Creating venv at {venv_dir}...")
STUDIO_HOME.mkdir(parents = True, exist_ok = True)
_venv.create(str(venv_dir), with_pip = True)
# 2. Install all Python deps via install_python_stack.py
install_script = _find_install_script()
if install_script:
typer.echo(" Installing Python dependencies...")
subprocess.run([str(venv_python), str(install_script)], check = True)
else:
typer.echo("Error: Could not find install_python_stack.py")
raise typer.Exit(1)
# 3. Pre-install transformers 5.x overlay
if venv_t5_dir.is_dir() and any(venv_t5_dir.iterdir()):
typer.echo(f" Transformers 5.x overlay already at {venv_t5_dir}")
else:
typer.echo(" Installing transformers 5.x overlay...")
venv_t5_dir.mkdir(parents = True, exist_ok = True)
subprocess.run(
[
str(venv_pip),
"install",
"--target",
str(venv_t5_dir),
"--no-deps",
"transformers==5.2.0",
],
check = True,
)
subprocess.run(
[
str(venv_pip),
"install",
"--target",
str(venv_t5_dir),
"--no-deps",
"huggingface_hub==1.3.0",
],
check = True,
)
typer.echo(f" Installed to {venv_t5_dir}")
# 4. Build llama.cpp
_build_llama_cpp()
typer.echo("")
typer.echo("Setup complete! Run 'unsloth studio' to start.")
def _build_llama_cpp():
"""Build llama.cpp at ~/.unsloth/llama.cpp/."""
import shutil
unsloth_home = Path.home() / ".unsloth"
llama_dir = unsloth_home / "llama.cpp"
if not shutil.which("cmake"):
typer.echo(" cmake not found — skipping llama.cpp build")
return
if not shutil.which("git"):
typer.echo(" git not found — skipping llama.cpp build")
return
typer.echo(" Building llama.cpp for GGUF inference...")
if llama_dir.exists():
# necessary because shutil.rmtree fails on Windows because .git pack files are read-only
def _force_remove_readonly(func, path, exc_info):
"""Clear read-only flag and retry — needed on Windows for .git pack files."""
import stat
os.chmod(path, stat.S_IWRITE)
func(path)
shutil.rmtree(llama_dir, onerror = _force_remove_readonly)
unsloth_home.mkdir(parents = True, exist_ok = True)
result = subprocess.run(
[
"git",
"clone",
"--depth",
"1",
"https://github.com/ggml-org/llama.cpp.git",
str(llama_dir),
],
stdout = subprocess.PIPE,
stderr = subprocess.STDOUT,
)
if result.returncode != 0:
typer.echo(" Failed to clone llama.cpp")
return
cmake_args = []
nvcc_path = shutil.which("nvcc")
if not nvcc_path and Path("/usr/local/cuda/bin/nvcc").is_file():
nvcc_path = "/usr/local/cuda/bin/nvcc"
if nvcc_path:
typer.echo(f" Building with CUDA (nvcc: {nvcc_path})...")
cmake_args.append("-DGGML_CUDA=ON")
else:
typer.echo(" Building CPU-only...")
build_dir = llama_dir / "build"
result = subprocess.run(
["cmake", "-S", str(llama_dir), "-B", str(build_dir)] + cmake_args,
stdout = subprocess.PIPE,
stderr = subprocess.STDOUT,
)
if result.returncode != 0:
typer.echo(" cmake configure failed")
return
ncpu = str(os.cpu_count() or 4)
result = subprocess.run(
[
"cmake",
"--build",
str(build_dir),
"--config",
"Release",
"--target",
"llama-server",
f"-j{ncpu}",
],
stdout = subprocess.PIPE,
stderr = subprocess.STDOUT,
)
if result.returncode != 0:
typer.echo(" llama-server build failed")
return
subprocess.run(
[
"cmake",
"--build",
str(build_dir),
"--config",
"Release",
"--target",
"llama-quantize",
f"-j{ncpu}",
],
stdout = subprocess.PIPE,
stderr = subprocess.STDOUT,
)
if sys.platform == "win32":
server_bin = build_dir / "bin" / "Release" / "llama-server.exe"
else:
server_bin = build_dir / "bin" / "llama-server"
if server_bin.is_file():
typer.echo(f" llama-server built at {server_bin}")
else:
typer.echo(" llama-server binary not found after build")

144
cli/commands/train.py Normal file
View file

@ -0,0 +1,144 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import time
from pathlib import Path
from typing import Optional
import typer
from cli.config import Config, load_config
from cli.options import add_options_from_config
@add_options_from_config(Config)
def train(
config: Optional[Path] = typer.Option(
None,
"--config",
"-c",
help = "Path to YAML/JSON config file. CLI flags override config values.",
),
hf_token: Optional[str] = typer.Option(
None, "--hf-token", envvar = "HF_TOKEN", help = "Hugging Face token if needed."
),
wandb_token: Optional[str] = typer.Option(
None, "--wandb-token", envvar = "WANDB_API_KEY", help = "Weights & Biases API key."
),
dry_run: bool = typer.Option(
False,
"--dry-run",
help = "Show resolved config and exit without training.",
),
config_overrides: dict = None,
):
"""Launch training using the existing Unsloth training backend."""
try:
cfg = load_config(config)
except FileNotFoundError as e:
typer.echo(f"Error: {e}", err = True)
raise typer.Exit(code = 2)
cfg.apply_overrides(**config_overrides)
# CLI/env tokens take precedence over config
# Handle case where typer.Option isn't resolved (decorator interaction)
from typer.models import OptionInfo
if isinstance(hf_token, OptionInfo):
hf_token = None
if isinstance(wandb_token, OptionInfo):
wandb_token = None
hf_token = hf_token or cfg.logging.hf_token
wandb_token = wandb_token or cfg.logging.wandb_token
if dry_run:
import yaml
data = cfg.model_dump()
data["training"]["output_dir"] = str(data["training"]["output_dir"])
typer.echo(yaml.dump(data, default_flow_style = False, sort_keys = False))
raise typer.Exit(code = 0)
if not cfg.model:
typer.echo("Error: provide --model or set model in --config", err = True)
raise typer.Exit(code = 2)
if not cfg.data.dataset and not cfg.data.local_dataset:
typer.echo(
"Error: provide --dataset or --local-dataset (or via --config)", err = True
)
raise typer.Exit(code = 2)
# Check if the model path is a LoRA adapter (has adapter_config.json)
model_path = Path(cfg.model) if cfg.model else None
model_is_lora = (
model_path
and model_path.is_dir()
and (model_path / "adapter_config.json").exists()
)
use_lora = cfg.training.training_type.lower() == "lora"
if model_is_lora and not use_lora:
typer.echo(
"Error: Cannot do full finetuning on a LoRA adapter. "
"Use --training-type lora or provide a base model.",
err = True,
)
raise typer.Exit(code = 2)
from studio.backend.core.training.trainer import UnslothTrainer
trainer = UnslothTrainer()
# Load model (trainer.is_vlm is set after this)
if not trainer.load_model(
model_name = cfg.model,
max_seq_length = cfg.training.max_seq_length,
load_in_4bit = cfg.training.load_in_4bit if use_lora else False,
hf_token = hf_token,
):
typer.echo("Model load failed", err = True)
raise typer.Exit(code = 1)
is_vision = trainer.is_vlm
if not trainer.prepare_model_for_training(**cfg.model_kwargs(use_lora, is_vision)):
typer.echo("Model preparation failed", err = True)
raise typer.Exit(code = 1)
result = trainer.load_and_format_dataset(
dataset_source = cfg.data.dataset or "",
format_type = cfg.data.format_type,
local_datasets = cfg.data.local_dataset,
)
if result is None:
typer.echo("Dataset load failed", err = True)
raise typer.Exit(code = 1)
ds, eval_ds = result
training_kwargs = cfg.training_kwargs()
training_kwargs["wandb_token"] = wandb_token # CLI/env takes precedence
started = trainer.start_training(
dataset = ds, eval_dataset = eval_ds, **training_kwargs
)
if not started:
typer.echo("Training failed to start", err = True)
raise typer.Exit(code = 1)
try:
while trainer.training_thread and trainer.training_thread.is_alive():
time.sleep(1)
except KeyboardInterrupt:
typer.echo("Stopping training (Ctrl+C detected)...")
trainer.stop_training()
finally:
if trainer.training_thread:
trainer.training_thread.join()
final = trainer.get_training_progress()
if getattr(final, "error", None):
typer.echo(f"Training error: {final.error}", err = True)
raise typer.Exit(code = 1)

76
cli/commands/ui.py Normal file
View file

@ -0,0 +1,76 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import os
import sys
import time
from pathlib import Path
from typing import Optional
import typer
def ui(
port: int = typer.Option(
8000, "--port", "-p", help = "Port to run the UI server on."
),
host: str = typer.Option(
"0.0.0.0", "--host", "-H", help = "Host address to bind to."
),
frontend: Optional[Path] = typer.Option(
None, "--frontend", "-f", help = "Path to frontend build directory."
),
silent: bool = typer.Option(
False, "--silent", "-q", help = "Suppress startup messages."
),
):
"""Launch the Unsloth web UI backend server (alias for 'unsloth studio')."""
from cli.commands.studio import _studio_venv_python, _find_run_py, STUDIO_HOME
# Re-execute in studio venv if available and not already inside it
studio_venv_dir = STUDIO_HOME / ".venv"
in_studio_venv = sys.prefix.startswith(str(studio_venv_dir))
if not in_studio_venv:
studio_python = _studio_venv_python()
run_py = _find_run_py()
if studio_python and run_py:
if not silent:
typer.echo("Launching with studio venv...")
args = [
str(studio_python),
str(run_py),
"--host",
host,
"--port",
str(port),
]
if frontend:
args.extend(["--frontend", str(frontend)])
if silent:
args.append("--silent")
os.execvp(str(studio_python), args)
else:
typer.echo("Studio not set up. Run 'unsloth studio setup' first.")
raise typer.Exit(1)
from studio.backend.run import run_server
if not silent:
from studio.backend.run import _resolve_external_ip
display_host = _resolve_external_ip() if host == "0.0.0.0" else host
typer.echo(f"Starting Unsloth Studio on http://{display_host}:{port}")
run_server(
host = host,
port = port,
frontend_path = frontend,
silent = silent,
)
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
typer.echo("\nShutting down...")

149
cli/config.py Normal file
View file

@ -0,0 +1,149 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
from pathlib import Path
from typing import Literal, Optional, List
import yaml
from pydantic import BaseModel, Field
class DataConfig(BaseModel):
dataset: Optional[str] = None
local_dataset: Optional[List[str]] = None
format_type: Literal["auto", "alpaca", "chatml", "sharegpt"] = "auto"
class TrainingConfig(BaseModel):
training_type: Literal["lora", "full"] = "lora"
max_seq_length: int = 2048
load_in_4bit: bool = True
output_dir: Path = Path("./outputs")
num_epochs: int = 3
learning_rate: float = 2e-4
batch_size: int = 2
gradient_accumulation_steps: int = 4
warmup_steps: int = 5
max_steps: int = 0
save_steps: int = 0
weight_decay: float = 0.01
random_seed: int = 3407
packing: bool = False
train_on_completions: bool = False
gradient_checkpointing: Literal["unsloth", "true", "none"] = "unsloth"
class LoraConfig(BaseModel):
lora_r: int = 64
lora_alpha: int = 16
lora_dropout: float = 0.0
target_modules: str = "q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj"
vision_all_linear: bool = False
use_rslora: bool = False
use_loftq: bool = False
finetune_vision_layers: bool = True
finetune_language_layers: bool = True
finetune_attention_modules: bool = True
finetune_mlp_modules: bool = True
class LoggingConfig(BaseModel):
enable_wandb: bool = False
wandb_project: str = "unsloth-training"
wandb_token: Optional[str] = None
enable_tensorboard: bool = False
tensorboard_dir: str = "runs"
hf_token: Optional[str] = None
class Config(BaseModel):
model: Optional[str] = None
data: DataConfig = Field(default_factory = DataConfig)
training: TrainingConfig = Field(default_factory = TrainingConfig)
lora: LoraConfig = Field(default_factory = LoraConfig)
logging: LoggingConfig = Field(default_factory = LoggingConfig)
def apply_overrides(self, **kwargs):
"""Apply CLI overrides by matching arg names to config fields."""
for key, value in kwargs.items():
if value is None:
continue
if hasattr(self, key):
setattr(self, key, value)
else:
for section in (self.data, self.training, self.lora, self.logging):
if hasattr(section, key):
setattr(section, key, value)
break
def model_kwargs(self, use_lora: bool, is_vision: bool) -> dict:
"""Return kwargs for trainer.prepare_model_for_training()."""
# Determine target modules based on model type
if use_lora and is_vision:
# Vision models expect a string (e.g., "all-linear"); fall back to None to use trainer defaults
target_modules = "all-linear" if self.lora.vision_all_linear else None
else:
parsed = [
m.strip()
for m in str(self.lora.target_modules).split(",")
if m and m.strip()
]
target_modules = parsed or None
return {
"use_lora": use_lora,
"finetune_vision_layers": self.lora.finetune_vision_layers,
"finetune_language_layers": self.lora.finetune_language_layers,
"finetune_attention_modules": self.lora.finetune_attention_modules,
"finetune_mlp_modules": self.lora.finetune_mlp_modules,
"target_modules": target_modules,
"lora_r": self.lora.lora_r,
"lora_alpha": self.lora.lora_alpha,
"lora_dropout": self.lora.lora_dropout,
"use_gradient_checkpointing": self.training.gradient_checkpointing,
"use_rslora": self.lora.use_rslora,
"use_loftq": self.lora.use_loftq,
}
def training_kwargs(self) -> dict:
"""Return kwargs for trainer.start_training()."""
return {
"output_dir": str(self.training.output_dir),
"num_epochs": self.training.num_epochs,
"learning_rate": self.training.learning_rate,
"batch_size": self.training.batch_size,
"gradient_accumulation_steps": self.training.gradient_accumulation_steps,
"warmup_steps": self.training.warmup_steps,
"max_steps": self.training.max_steps,
"save_steps": self.training.save_steps,
"weight_decay": self.training.weight_decay,
"random_seed": self.training.random_seed,
"packing": self.training.packing,
"train_on_completions": self.training.train_on_completions,
"max_seq_length": self.training.max_seq_length,
"enable_wandb": self.logging.enable_wandb,
"wandb_project": self.logging.wandb_project,
"wandb_token": self.logging.wandb_token,
"enable_tensorboard": self.logging.enable_tensorboard,
"tensorboard_dir": self.logging.tensorboard_dir,
}
def load_config(path: Optional[Path]) -> Config:
"""Load config from YAML/JSON file, or return defaults if no path given."""
if not path:
return Config()
path = Path(path)
if not path.exists():
raise FileNotFoundError(f"Config file not found: {path}")
text = path.read_text(encoding = "utf-8")
if path.suffix.lower() in {".yaml", ".yml"}:
data = yaml.safe_load(text) or {}
else:
import json
data = json.loads(text or "{}")
return Config(**data)

153
cli/options.py Normal file
View file

@ -0,0 +1,153 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
"""Generate Typer CLI options from Pydantic models."""
import functools
import inspect
from pathlib import Path
from typing import Any, Callable, Optional, get_args, get_origin
import typer
from pydantic import BaseModel
def _python_name_to_cli_flag(name: str) -> str:
"""Convert python_name to --cli-flag."""
return "--" + name.replace("_", "-")
def _unwrap_optional(annotation: Any) -> Any:
"""Unwrap Optional[X] to X."""
origin = get_origin(annotation)
if origin is not None:
args = get_args(annotation)
if type(None) in args:
non_none = [a for a in args if a is not type(None)]
if non_none:
return non_none[0]
return annotation
def _is_bool_field(annotation: Any) -> bool:
"""Check if field is a boolean (including Optional[bool])."""
return _unwrap_optional(annotation) is bool
def _is_list_type(annotation: Any) -> bool:
"""Check if type is a List."""
return get_origin(annotation) is list
def _get_python_type(annotation: Any) -> type:
"""Get the Python type for annotation."""
unwrapped = _unwrap_optional(annotation)
if unwrapped in (str, int, float, bool, Path):
return unwrapped
return str
def _collect_config_fields(config_class: type[BaseModel]) -> list[tuple[str, Any]]:
"""
Collect all fields from a config class, flattening nested models. Returns list of
(name, field_info) tuples. Raises ValueError on duplicate field names.
"""
fields = []
seen_names: set[str] = set()
for name, field_info in config_class.model_fields.items():
annotation = field_info.annotation
# Skip nested models - recurse into them
if isinstance(annotation, type) and issubclass(annotation, BaseModel):
for nested_name, nested_field in annotation.model_fields.items():
if nested_name in seen_names:
raise ValueError(f"Duplicate field name '{nested_name}' in config")
seen_names.add(nested_name)
fields.append((nested_name, nested_field))
else:
if name in seen_names:
raise ValueError(f"Duplicate field name '{name}' in config")
seen_names.add(name)
fields.append((name, field_info))
return fields
def add_options_from_config(config_class: type[BaseModel]) -> Callable:
"""
Decorator that adds CLI options for all fields in a Pydantic config model.
The decorated function should declare a `config_overrides: dict = None` parameter
which will receive a dict of all CLI-provided config values.
"""
fields = _collect_config_fields(config_class)
field_names = {
name for name, field_info in fields if not _is_list_type(field_info.annotation)
}
def decorator(func: Callable) -> Callable:
sig = inspect.signature(func)
original_params = list(sig.parameters.values())
original_param_names = {p.name for p in original_params}
# Build new parameters: config fields first, then original params
new_params = []
for field_name, field_info in fields:
# Skip fields already defined in function signature (e.g., with envvar)
if field_name in original_param_names:
continue
annotation = field_info.annotation
if _is_list_type(annotation):
continue
flag_name = _python_name_to_cli_flag(field_name)
help_text = field_info.description or ""
if _is_bool_field(annotation):
default = typer.Option(
None,
f"{flag_name}/--no-{field_name.replace('_', '-')}",
help = help_text,
)
param = inspect.Parameter(
field_name,
inspect.Parameter.POSITIONAL_OR_KEYWORD,
default = default,
annotation = Optional[bool],
)
else:
py_type = _get_python_type(annotation)
default = typer.Option(None, flag_name, help = help_text)
param = inspect.Parameter(
field_name,
inspect.Parameter.POSITIONAL_OR_KEYWORD,
default = default,
annotation = Optional[py_type],
)
new_params.append(param)
# Add original params, excluding config_overrides (will be injected)
for param in original_params:
if param.name != "config_overrides":
new_params.append(param)
new_sig = sig.replace(parameters = new_params)
@functools.wraps(func)
def wrapper(*args, **kwargs):
config_overrides = {}
for key in list(kwargs.keys()):
if key in field_names:
if kwargs[key] is not None:
config_overrides[key] = kwargs[key]
# Only delete if not an explicitly declared parameter
if key not in original_param_names:
del kwargs[key]
kwargs["config_overrides"] = config_overrides
return func(*args, **kwargs)
wrapper.__signature__ = new_sig
return wrapper
return decorator

661
studio/LICENSE.AGPL-3.0 Normal file
View file

@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.

View file

@ -0,0 +1,111 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "f2b0c6a1",
"metadata": {},
"source": [
"**License Notice**\n",
"\n",
"SPDX-License-Identifier: AGPL-3.0-only\n",
"\n",
"Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "447c1156",
"metadata": {},
"outputs": [],
"source": [
"# ===========================================\n",
"# ⚠️ GPU Check - Run This First!\n",
"# ===========================================\n",
"import torch\n",
"\n",
"print(\"🔍 Checking for GPU...\")\n",
"if not torch.cuda.is_available():\n",
" print(\"❌ ERROR: No GPU detected!\")\n",
" print(\"\\n📋 To enable GPU:\")\n",
" print(\" 1. Go to: Runtime → Change runtime type\")\n",
" print(\" 2. Select: Hardware accelerator → GPU (T4 is free)\")\n",
" print(\" 3. Click: Save\")\n",
" print(\" 4. Restart and re-run all cells\")\n",
" raise RuntimeError(\"⛔ GPU required for Unsloth Studio\")\n",
"else:\n",
" gpu_name = torch.cuda.get_device_name(0)\n",
" print(f\"✅ GPU detected: {gpu_name}\")\n",
" print(\" Ready to proceed!\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f04a9b46",
"metadata": {},
"outputs": [],
"source": [
"# ===========================================\n",
"# GitHub Authentication (Private Repo)\n",
"# ===========================================\n",
"from getpass import getpass\n",
"import os\n",
"\n",
"print(\"🔐 GitHub Token Required\")\n",
"print(\"Get token: https://github.com/settings/tokens\")\n",
"print(\"Scope needed: 'repo'\")\n",
"print(\"-\" * 50)\n",
"\n",
"github_token = getpass(\"Enter GitHub Token: \")\n",
"os.environ['GITHUB_TOKEN'] = github_token\n",
"print(\"✅ Token stored\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "27e68f91",
"metadata": {},
"outputs": [],
"source": [
"# ===========================================\n",
"# Setup: Clone repo and run setup\n",
"# ===========================================\n",
"\n",
"import os\n",
"github_token = os.environ['GITHUB_TOKEN']\n",
"!git clone https://{github_token}@github.com/unslothai/new-ui-prototype.git\n",
"%cd /content/new-ui-prototype\n",
"\n",
"# Run setup script\n",
"!chmod +x setup.sh\n",
"!./setup.sh"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "277e431e",
"metadata": {},
"outputs": [],
"source": [
"# ===========================================\n",
"# Start Unsloth Studio\n",
"# ===========================================\n",
"import sys\n",
"sys.path.insert(0, '/content/new-ui-prototype/studio/backend')\n",
"\n",
"from colab import start\n",
"start()"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

2
studio/__init__.py Normal file
View file

@ -0,0 +1,2 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0

View file

@ -0,0 +1,2 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0

View file

@ -0,0 +1,2 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0

View file

@ -0,0 +1,2 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0

View file

@ -0,0 +1,42 @@
model: unsloth/Qwen2.5-0.5B
data:
dataset: tatsu-lab/alpaca
format_type: auto
training:
training_type: full
max_seq_length: 2048
load_in_4bit: false
output_dir: outputs
num_epochs: 1
learning_rate: 0.0002
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 0
save_steps: 0
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: false
gradient_checkpointing: "unsloth"
lora:
lora_r: 64
lora_alpha: 16
lora_dropout: 0.0
target_modules: ""
vision_all_linear: false
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: unsloth-training
enable_tensorboard: false
tensorboard_dir: runs

View file

@ -0,0 +1,42 @@
model: unsloth/Qwen2.5-0.5B
data:
dataset: tatsu-lab/alpaca
format_type: auto
training:
training_type: lora
max_seq_length: 2048
load_in_4bit: true
output_dir: outputs
num_epochs: 1
learning_rate: 0.0002
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 0
save_steps: 0
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: false
gradient_checkpointing: "unsloth"
lora:
lora_r: 64
lora_alpha: 16
lora_dropout: 0.0
target_modules: "q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj"
vision_all_linear: false
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: unsloth-training
enable_tensorboard: false
tensorboard_dir: runs

View file

@ -0,0 +1,56 @@
# Default model training parameters
# Used for models without specific configurations
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 5e-5
batch_size: 2
gradient_accumulation_steps: 4
warmup_ratio: 0.1
max_steps: 30
save_steps: 30
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.7
top_p: 0.95
top_k: -1
min_p: 0.01

View file

@ -0,0 +1,43 @@
# Model defaults for unsloth/Qwen3-Embedding-0.6B
# Based on Qwen3_Embedding_(0_6B).py embedding notebook
# Also applies to: unsloth/Qwen3-Embedding-4B
training:
max_seq_length: 512
# num_epochs: 2
num_epochs: 0
learning_rate: 3e-5
batch_size: 256
gradient_accumulation_steps: 1
warmup_ratio: 0.03
max_steps: 30
save_steps: 30
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: false
gradient_checkpointing: false
optim: "adamw_8bit"
lr_scheduler_type: "constant_with_warmup"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "embedding-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 50

View file

@ -0,0 +1,39 @@
# Model defaults for unsloth/all-MiniLM-L6-v2
# Based on All_MiniLM_L6_v2.py embedding notebook
training:
max_seq_length: 512
# num_epochs: 2
num_epochs: 0
learning_rate: 2e-4
batch_size: 256
gradient_accumulation_steps: 1
warmup_ratio: 0.03
max_steps: 30
save_steps: 30
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: false
gradient_checkpointing: false
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 64
lora_alpha: 128
lora_dropout: 0.0
target_modules:
- "value"
- "key"
- "dense"
- "query"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "embedding-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 50

View file

@ -0,0 +1,39 @@
# Model defaults for unsloth/bge-m3
# Based on BGE_M3.py embedding notebook
training:
max_seq_length: 512
# num_epochs: 2
num_epochs: 0
learning_rate: 3e-5
batch_size: 256
gradient_accumulation_steps: 1
warmup_ratio: 0.03
max_steps: 30
save_steps: 30
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: false
gradient_checkpointing: false
optim: "adamw_8bit"
lr_scheduler_type: "constant_with_warmup"
lora:
lora_r: 32
lora_alpha: 64
lora_dropout: 0.0
target_modules:
- "key"
- "query"
- "dense"
- "value"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "embedding-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 50

View file

@ -0,0 +1,42 @@
# Model defaults for unsloth/embeddinggemma-300m
# Based on EmbeddingGemma_(300M).py embedding notebook
training:
max_seq_length: 1024
# num_epochs: 1
num_epochs: 0
learning_rate: 2e-5
batch_size: 64
gradient_accumulation_steps: 2
warmup_ratio: 0.03
max_steps: 30
save_steps: 30
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: false
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 64
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "embedding-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 5

View file

@ -0,0 +1,38 @@
# Model defaults for unsloth/gte-modernbert-base
# Based on ModernBert.py embedding notebook
training:
max_seq_length: 512
# num_epochs: 2
num_epochs: 0
learning_rate: 3e-5
batch_size: 256
gradient_accumulation_steps: 1
warmup_ratio: 0.03
max_steps: 30
save_steps: 30
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: false
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "constant_with_warmup"
lora:
lora_r: 64
lora_alpha: 128
lora_dropout: 0.0
target_modules:
- "Wi"
- "Wo"
- "Wqkv"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "embedding-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 50

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/ERNIE-4.5-21B-A3B-PT
# Based on ERNIE_4_5_21B_A3B_PT-Conversational.ipynb
# Also applies to: unsloth/ERNIE-4.5-21B-A3B-PT
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 4
gradient_accumulation_steps: 2
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 8
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,55 @@
# Model defaults for unsloth/ERNIE-4.5-VL-28B-A3B-PT
# Based on ERNIE_4_5_VL_28B_A3B_PT_Vision.ipynb
# Also applies to: unsloth/ERNIE-4.5-VL-28B-A3B-PT
# added inference parameters from unsloth notebook
training:
trust_remote_code: true
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 2
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 8
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: true
temperature: 1.5
min_p: 0.1

View file

@ -0,0 +1,47 @@
# Model defaults for tiiuae/Falcon-H1-0.5B-Instruct
# Based on Falcon_H1_(0.5B)-Alpaca.ipynb
# Also applies to: tiiuae/Falcon-H1-0.5B-Instruct, unsloth/Falcon-H1-0.5B-Instruct
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 8
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: false
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.1
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,50 @@
# Model defaults for unsloth/codegemma-7b-bnb-4bit
# Based on CodeGemma_(7B)-Conversational.ipynb
# Also applies to: unsloth/codegemma-7b, google/codegemma-7b
# added inference parameters from Ollama
training:
trust_remote_code: false
max_seq_length: 4096
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0
top_p: 0.9

View file

@ -0,0 +1,53 @@
# Model defaults for unsloth/functiongemma-270m-it
# Based on FunctionGemma_(270M).ipynb
# Also applies to: unsloth/functiongemma-270m-it-unsloth-bnb-4bit, google/functiongemma-270m-it, unsloth/functiongemma-270m-it-unsloth-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 4096
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 4
gradient_accumulation_steps: 2
warmup_steps: 10
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 128
lora_alpha: 256
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.0
top_k: 64
top_p: 0.95
min_p: 0.0

View file

@ -0,0 +1,46 @@
# Model defaults for unsloth/gemma-2-27b-bnb-4bit
# Based on Gemma2_(9B)-Alpaca.ipynb (same defaults for larger models)
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/gemma-2-2b
# Based on Gemma2_(2B)-Alpaca.ipynb
# Also applies to: unsloth/gemma-2-2b-bnb-4bit, google/gemma-2-2b
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,53 @@
# Model defaults for unsloth/gemma-3-270m-it
# Based on Gemma3_(270M).ipynb
# Also applies to: unsloth/gemma-3-270m-it-unsloth-bnb-4bit, google/gemma-3-270m-it, unsloth/gemma-3-270m-it-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 5e-5
batch_size: 4
gradient_accumulation_steps: 1
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 128
lora_alpha: 128
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.0
top_k: 64
top_p: 0.95
min_p: 0.0

View file

@ -0,0 +1,51 @@
# Model defaults for unsloth/gemma-3-27b-it
# Based on Gemma3_(27B)_A100-Conversational.ipynb
# Also applies to: unsloth/gemma-3-27b-it-unsloth-bnb-4bit, google/gemma-3-27b-it, unsloth/gemma-3-27b-it-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 8
lora_alpha: 8
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.0
top_k: 64
top_p: 0.95
min_p: 0.0

View file

@ -0,0 +1,51 @@
# Model defaults for unsloth/gemma-3-4b-it
# Based on Gemma3_(4B).ipynb
# Also applies to: unsloth/gemma-3-4b-it-unsloth-bnb-4bit, google/gemma-3-4b-it, unsloth/gemma-3-4b-it-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 8
lora_alpha: 8
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.0
top_k: 64
top_p: 0.95
min_p: 0.0

View file

@ -0,0 +1,51 @@
# Model defaults for unsloth/gemma-3-4b-pt
# Based on Gemma3_(4B)-Vision.ipynb
# Also applies to: unsloth/gemma-3-4b-pt-unsloth-bnb-4bit, google/gemma-3-4b-pt, unsloth/gemma-3-4b-pt-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 2
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_ratio: 0.03
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: true
optim: "adamw_torch_fused"
lr_scheduler_type: "cosine"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.0
top_k: 64
top_p: 0.95
min_p: 0.0

View file

@ -0,0 +1,53 @@
# Model defaults for unsloth/gemma-3n-E4B-it
# Based on Gemma3N_(4B)-Conversational.ipynb
# Also applies to: unsloth/gemma-3n-E4B-it-unsloth-bnb-4bit, google/gemma-3n-E4B-it, unsloth/gemma-3n-E4B-it-unsloth-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 1024
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 8
lora_alpha: 8
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
audio_input: true
inference:
trust_remote_code: false
temperature: 1.0
top_k: 64
top_p: 0.95
min_p: 0.0

View file

@ -0,0 +1,53 @@
# Model defaults for unsloth/gemma-3n-E4B
# Based on Gemma3N_(4B)-Vision.ipynb
# Also applies to: unsloth/gemma-3n-E4B-unsloth-bnb-4bit, google/gemma-3n-E4B
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 2
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_ratio: 0.03
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: true
optim: "adamw_torch_fused"
lr_scheduler_type: "cosine"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
audio_input: true
inference:
trust_remote_code: false
temperature: 1.0
top_k: 64
top_p: 0.95
min_p: 0.0

View file

@ -0,0 +1,52 @@
# Model defaults for unsloth/gpt-oss-120b
# Based on gpt-oss-(120B)_A100-Fine-tuning.ipynb
# Also applies to: openai/gpt-oss-120b, unsloth/gpt-oss-120b-unsloth-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 4096
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 4
gradient_accumulation_steps: 1
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.0
top_p: 1.0
top_k: 0

View file

@ -0,0 +1,52 @@
# Model defaults for unsloth/gpt-oss-20b
# Based on gpt-oss-(20B)-Fine-tuning.ipynb
# Also applies to: openai/gpt-oss-20b, unsloth/gpt-oss-20b-unsloth-bnb-4bit, unsloth/gpt-oss-20b-BF16
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 1024
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 8
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.0
top_p: 1.0
top_k: 0

View file

@ -0,0 +1,54 @@
# Model defaults for unsloth/granite-4.0-350m
# Based on Granite4.0_350M.ipynb
# Also applies to: ibm-granite/granite-4.0-350m, unsloth/granite-4.0-350m-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
- "shared_mlp.input_linear"
- "shared_mlp.output_linear"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.0
top_p: 1.0
top_k: 0

View file

@ -0,0 +1,54 @@
# Model defaults for unsloth/granite-4.0-h-micro
# Based on Granite4.0.ipynb
# Also applies to: ibm-granite/granite-4.0-h-micro, unsloth/granite-4.0-h-micro-bnb-4bit, unsloth/granite-4.0-h-micro-unsloth-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
- "shared_mlp.input_linear"
- "shared_mlp.output_linear"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.0
top_p: 1.0
top_k: 0

View file

@ -0,0 +1,49 @@
# Model defaults for unsloth/Llama-3.2-11B-Vision-Instruct
# Based on Llama3.2_(11B)-Vision.ipynb
# Also applies to: unsloth/Llama-3.2-11B-Vision-Instruct-unsloth-bnb-4bit, meta-llama/Llama-3.2-11B-Vision-Instruct, unsloth/Llama-3.2-11B-Vision-Instruct-bnb-4bit
# added inference parameters from unsloth notebook
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.5
min_p: 0.1

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Llama-3.2-1B-Instruct
# Based on Llama3.2_(1B)-RAFT.ipynb
# Also applies to: unsloth/Llama-3.2-1B-Instruct-unsloth-bnb-4bit, meta-llama/Llama-3.2-1B-Instruct, unsloth/Llama-3.2-1B-Instruct-bnb-4bit, RedHatAI/Llama-3.2-1B-Instruct-FP8, unsloth/Llama-3.2-1B-Instruct-FP8-Block, unsloth/Llama-3.2-1B-Instruct-FP8-Dynamic
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 5
num_epochs: 0
learning_rate: 2e-5
batch_size: 1
gradient_accumulation_steps: 8
warmup_steps: 0
max_steps: 30
save_steps: 30
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: true
optim: "adamw_torch"
lr_scheduler_type: "cosine"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,51 @@
# Model defaults for unsloth/Llama-3.2-3B-Instruct
# Based on Llama3.2_(1B_and_3B)-Conversational.ipynb
# Also applies to: unsloth/Llama-3.2-3B-Instruct-unsloth-bnb-4bit, meta-llama/Llama-3.2-3B-Instruct, unsloth/Llama-3.2-3B-Instruct-bnb-4bit, RedHatAI/Llama-3.2-3B-Instruct-FP8, unsloth/Llama-3.2-3B-Instruct-FP8-Block, unsloth/Llama-3.2-3B-Instruct-FP8-Dynamic
# added inference parameters from unsloth notebook
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.5
min_p: 0.1

View file

@ -0,0 +1,51 @@
# Model defaults for unsloth/Llama-3.3-70B-Instruct
# Based on Llama3.3_(70B)_A100-Conversational.ipynb
# Also applies to: unsloth/Llama-3.3-70B-Instruct-unsloth-bnb-4bit, meta-llama/Llama-3.3-70B-Instruct, unsloth/Llama-3.3-70B-Instruct-bnb-4bit, RedHatAI/Llama-3.3-70B-Instruct-FP8, unsloth/Llama-3.3-70B-Instruct-FP8-Block, unsloth/Llama-3.3-70B-Instruct-FP8-Dynamic
# added inference parameters from unsloth notebook
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.5
min_p: 0.1

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Meta-Llama-3.1-70B-bnb-4bit
# Based on Llama3.1_(8B)-Alpaca.ipynb
# Also applies to: unsloth/Meta-Llama-3.1-8B-bnb-4bit, unsloth/Meta-Llama-3.1-8B-unsloth-bnb-4bit, meta-llama/Meta-Llama-3.1-8B, unsloth/Meta-Llama-3.1-8B, unsloth/Meta-Llama-3.1-70B, meta-llama/Meta-Llama-3.1-70B, unsloth/Meta-Llama-3.1-405B-bnb-4bit, meta-llama/Meta-Llama-3.1-405B
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit
# Based on Llama3.1_(8B)-Inference.ipynb
# Also applies to: "unsloth/Meta-Llama-3.1-8B-Instruct-unsloth-bnb-4bit", "meta-llama/Meta-Llama-3.1-8B-Instruct", "unsloth/Meta-Llama-3.1-8B-Instruct","RedHatAI/Llama-3.1-8B-Instruct-FP8","unsloth/Llama-3.1-8B-Instruct-FP8-Block","unsloth/Llama-3.1-8B-Instruct-FP8-Dynamic"
training:
trust_remote_code: false
max_seq_length: 8192
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/llama-3-8b-Instruct-bnb-4bit
# Based on Llama3_(8B)-Conversational.ipynb
# Also applies to: unsloth/llama-3-8b-Instruct, meta-llama/Meta-Llama-3-8B-Instruct
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/llama-3-8b-bnb-4bit
# Based on Llama3_(8B)-Alpaca.ipynb
# Also applies to: unsloth/llama-3-8b, meta-llama/Meta-Llama-3-8B
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,46 @@
# Model defaults for unsloth/Llasa-3B
# Based on Llasa_TTS_(3B).ipynb and Llasa_TTS_(1B).ipynb
# Also applies to: HKUSTAudio/Llasa-1B
# added inference parameters from unsloth notebook
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 5e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 128
lora_alpha: 128
lora_dropout: 0.0
target_modules:
- "q_proj"
- "v_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.2
top_p: 1.2

View file

@ -0,0 +1,56 @@
# Model defaults for unsloth/Magistral-Small-2509
# Based on Magistral_(24B)-Reasoning-Conversational.ipynb
# Also applies to: mistralai/Magistral-Small-2509, unsloth/Magistral-Small-2509-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 2
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.7
min_p: 0.01
top_p: 0.95

View file

@ -0,0 +1,55 @@
# Model defaults for unsloth/Ministral-3-3B-Instruct-2512
# Based on Ministral_3_VL_(3B)_Vision.ipynb
# Also applies to: unsloth/Ministral-3-3B-Instruct-2512
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 4
gradient_accumulation_steps: 2
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.15
top_p: default

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Mistral-Nemo-Base-2407-bnb-4bit
# Based on Mistral_Nemo_(12B)-Alpaca.ipynb
# Also applies to: "unsloth/Mistral-Nemo-Base-2407", "mistralai/Mistral-Nemo-Base-2407", "unsloth/Mistral-Nemo-Instruct-2407-bnb-4bit", "unsloth/Mistral-Nemo-Instruct-2407", "mistralai/Mistral-Nemo-Instruct-2407",
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Mistral-Small-Instruct-2409
# Based on Mistral_Small_(22B)-Alpaca.ipynb
# Also applies to: unsloth/Mistral-Small-Instruct-2409-bnb-4bit, mistralai/Mistral-Small-Instruct-2409
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,49 @@
# Model defaults for unsloth/Pixtral-12B-2409
# Based on Pixtral_(12B)-Vision.ipynb
# Also applies to: unsloth/Pixtral-12B-2409-unsloth-bnb-4bit, mistralai/Pixtral-12B-2409, unsloth/Pixtral-12B-2409-bnb-4bit
# added inference parameters from unsloth notebook
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "paged_adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 8
lora_alpha: 8
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: false
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.5
min_p: 0.1

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/mistral-7b-instruct-v0.3-bnb-4bit
# Based on Mistral_v0.3_(7B)-Conversational.ipynb
# Also applies to: unsloth/mistral-7b-instruct-v0.3, mistralai/Mistral-7B-Instruct-v0.3
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,46 @@
# Model defaults for unsloth/mistral-7b-v0.3-bnb-4bit
# Based on Mistral_v0.3_(7B)-Alpaca.ipynb
# Also applies to: "unsloth/mistral-7b-v0.3", "mistralai/Mistral-7B-v0.3",
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,51 @@
# Model defaults for OuteAI/Llama-OuteTTS-1.0-1B
# Based on Oute_TTS_(1B).ipynb
# Also applies to: OuteAI/Llama-OuteTTS-1.0-1B
# added inference parameters from unsloth notebook
audio_type: dac
training:
trust_remote_code: false
eval_steps: 0
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 128
lora_alpha: 128
lora_dropout: 0.0
target_modules:
- "q_proj"
- "v_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.4
top_k: 40
top_p: 0.9
min_p: 0.05

View file

@ -0,0 +1,55 @@
# Model defaults for Spark-TTS-0.5B/LLM
# Based on Spark_TTS_(0_5B).ipynb
# Also applies to: Spark-TTS-0.5B/LLM
# added inference parameters from unsloth notebook
audio_type: bicodec
training:
trust_remote_code: false
eval_steps: 0
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 128
lora_alpha: 128
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.8
top_k: 50
top_p: 1.0

View file

@ -0,0 +1,50 @@
# Model defaults for sesame/csm-1b
# Based on Sesame_CSM_(1B)-TTS.ipynb
# Also applies to: sesame/csm-1b
audio_type: csm
training:
trust_remote_code: false
eval_steps: 0
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,52 @@
# Model defaults for unsloth/GLM-4.7-Flash
# Based on GLM_Flash_A100(80GB).py
# Also applies to: unsloth/GLM-4.7-Flash-unsloth-bnb-4bit, unsloth/GLM-4.7-Flash-bnb-4bit, THUDM/GLM-4.7-Flash
training:
trust_remote_code: true
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 4
gradient_accumulation_steps: 2
warmup_steps: 5
max_steps: 60
save_steps: 60
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 8
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
- "out_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: true
temperature: 0.7
top_p: 0.8
top_k: 20

View file

@ -0,0 +1,45 @@
# Model defaults for unsloth/LFM2-1.2B
# Based on Liquid_LFM2_(1.2B)-Conversational.ipynb
# Also applies to: unsloth/LFM2-1.2B
# added inference parameters from unsloth notebook
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.3
min_p: 0.15

View file

@ -0,0 +1,53 @@
# Model defaults for unsloth/Nemotron-3-Nano-30B-A3B
# Based on Nemotron-3-Nano-30B-A3B_A100.ipynb
# Also applies to: unsloth/Nemotron-3-Nano-30B-A3B
# added inference parameters from unsloth guides
training:
trust_remote_code: true
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 4
gradient_accumulation_steps: 2
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 8
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
- "in_proj"
- "out_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: true
temperature: 1.0
top_p: 1.0

View file

@ -0,0 +1,55 @@
# Model defaults for unsloth/PaddleOCR-VL
# Based on Paddle_OCR_(1B)_Vision.ipynb
# Also applies to: unsloth/PaddleOCR-VL
# added inference parameters from unsloth notebook
training:
trust_remote_code: true
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 5e-5
batch_size: 4
gradient_accumulation_steps: 2
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 64
lora_alpha: 64
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: true
temperature: 1.5
min_p: 0.1

View file

@ -0,0 +1,46 @@
# Model defaults for answerdotai/ModernBERT-large
# Based on bert_classification.ipynb
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 1
num_epochs: 0
learning_rate: 5e-5
batch_size: 32
gradient_accumulation_steps: 1
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,54 @@
# Model defaults for unsloth/orpheus-3b-0.1-ft
# Based on Orpheus_(3B)-TTS.ipynb
# Also applies to: unsloth/orpheus-3b-0.1-ft-unsloth-bnb-4bit, canopylabs/orpheus-3b-0.1-ft, unsloth/orpheus-3b-0.1-ft-bnb-4bit
# added inference parameters from unsloth notebook
audio_type: snac
training:
trust_remote_code: false
eval_steps: 0
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 64
lora_alpha: 64
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.6
top_p: 0.95

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/tinyllama
# Based on TinyLlama_(1.1B)-Alpaca.ipynb
# Also applies to: TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
training:
trust_remote_code: false
max_seq_length: 4096
# num_epochs: 1
num_epochs: 0
learning_rate: 2e-5
batch_size: 2
gradient_accumulation_steps: 4
warmup_ratio: 0.1
max_steps: 30
save_steps: 30
weight_decay: 0.1
random_seed: 3407
packing: true
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,46 @@
# Model defaults for unsloth/whisper-large-v3
# Based on Whisper.ipynb
# Also applies to: unsloth/whisper-large-v3, openai/whisper-large-v3
audio_type: whisper
audio_input: true
training:
trust_remote_code: false
eval_steps: 5
max_seq_length: 448
# num_epochs: 4
num_epochs: 0
learning_rate: 1e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 64
lora_alpha: 64
lora_dropout: 0.0
target_modules:
- "q_proj"
- "v_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Phi-3-medium-4k-instruct
# Based on Phi_3_Medium-Conversational.ipynb
# Also applies to: "unsloth/Phi-3-medium-4k-instruct-bnb-4bit", "microsoft/Phi-3-medium-4k-instruct",
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Phi-3.5-mini-instruct
# Based on Phi_3.5_Mini-Conversational.ipynb
# Also applies to: "unsloth/Phi-3.5-mini-instruct-bnb-4bit", "microsoft/Phi-3.5-mini-instruct"
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,51 @@
# Model defaults for unsloth/Phi-4
# Based on Phi_4-Conversational.ipynb
# Also applies to: unsloth/phi-4-unsloth-bnb-4bit, microsoft/phi-4, unsloth/phi-4-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.8
top_p: 0.95

View file

@ -0,0 +1,53 @@
# Model defaults for imdatta0/tiny_qwen3_moe_2.8B_0.7B
# Based on TinyQwen3_MoE.py
# Dummy model of qwen3moe architecture created to fit in T4
# MoE model - includes gate_up_proj for MoE layers
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 1
warmup_steps: 5
max_steps: 50
save_steps: 50
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 64
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
- "gate_up_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.6
top_k: 20
top_p: 0.95

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Qwen2-7B
# Based on Qwen2_(7B)-Alpaca.ipynb
# Also applies to: unsloth/Qwen2-7B-bnb-4bit, Qwen/Qwen2-7B
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,49 @@
# Model defaults for unsloth/Qwen2-VL-7B-Instruct
# Based on Qwen2_VL_(7B)-Vision.ipynb
# Also applies to: unsloth/Qwen2-VL-7B-Instruct-unsloth-bnb-4bit, Qwen/Qwen2-VL-7B-Instruct, unsloth/Qwen2-VL-7B-Instruct-bnb-4bit
# added inference parameters from unsloth notebook
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.5
min_p: 0.1

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Qwen2.5-1.5B-Instruct
# Based on nemo_gym_sudoku.ipynb
# Also applies to: unsloth/Qwen2.5-1.5B-Instruct-unsloth-bnb-4bit, Qwen/Qwen2.5-1.5B-Instruct, unsloth/Qwen2.5-1.5B-Instruct-bnb-4bit
training:
trust_remote_code: false
max_seq_length: 4096
# num_epochs: 4
num_epochs: 0
learning_rate: 1e-5
batch_size: 1
gradient_accumulation_steps: 64
warmup_ratio: 0.1
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 42
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 4
lora_alpha: 8
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Qwen2.5-7B
# Based on Qwen2.5_(7B)-Alpaca.ipynb
# Also applies to: unsloth/Qwen2.5-7B-unsloth-bnb-4bit, Qwen/Qwen2.5-7B, unsloth/Qwen2.5-7B-bnb-4bit
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Qwen2.5-Coder-1.5B-Instruct
# Based on Qwen2.5_Coder_(1.5B)-Tool_Calling.ipynb
# Also applies to: unsloth/Qwen2.5-Coder-1.5B-Instruct-bnb-4bit, Qwen/Qwen2.5-Coder-1.5B-Instruct
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,51 @@
# Model defaults for unsloth/Qwen2.5-Coder-14B-Instruct
# Based on Qwen2.5_Coder_(14B)-Conversational.ipynb
# Also applies to: unsloth/Qwen2.5-Coder-14B-Instruct-bnb-4bit, Qwen/Qwen2.5-Coder-14B-Instruct
# added inference parameters from unsloth notebook
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "paged_adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.5
min_p: 0.1

View file

@ -0,0 +1,47 @@
# Model defaults for unsloth/Qwen2.5-Coder-7B-Instruct-bnb-4bit
# Based on CodeForces-cot-Finetune_for_Reasoning_on_CodeForces.ipynb
# Also applies to: unsloth/Qwen2.5-Coder-7B-Instruct, Qwen/Qwen2.5-Coder-7B-Instruct
training:
trust_remote_code: false
max_seq_length: 32768
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false

View file

@ -0,0 +1,49 @@
# Model defaults for unsloth/Qwen2.5-VL-7B-Instruct-bnb-4bit
# Based on Qwen2.5_VL_(7B)-Vision.ipynb
# Also applies to: unsloth/Qwen2.5-VL-7B-Instruct, Qwen/Qwen2.5-VL-7B-Instruct, unsloth/Qwen2.5-VL-7B-Instruct-unsloth-bnb-4bit
# added inference parameters from unsloth notebook
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 1.5
min_p: 0.1

View file

@ -0,0 +1,52 @@
# Model defaults for unsloth/Qwen3-0.6B
# Based on Qwen3_(0_6B)-Phone_Deployment.ipynb
# Also applies to: unsloth/Qwen3-0.6B-unsloth-bnb-4bit, Qwen/Qwen3-0.6B, unsloth/Qwen3-0.6B-bnb-4bit, Qwen/Qwen3-0.6B-FP8, unsloth/Qwen3-0.6B-FP8
# added inference parameters from Ollama
training:
trust_remote_code: false
max_seq_length: 1024
# num_epochs: 4
num_epochs: 0
learning_rate: 5e-5
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.6
top_k: 20
top_p: 0.95

View file

@ -0,0 +1,51 @@
# Model defaults for unsloth/Qwen3-14B-Base
# Based on Qwen3_(14B)-Alpaca.ipynb
# Also applies to: unsloth/Qwen3-14B-Base, Qwen/Qwen3-14B-Base, unsloth/Qwen3-14B-Base-bnb-4bit
# added inference parameters from Ollama
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.6
top_k: 20
top_p: 0.95

View file

@ -0,0 +1,52 @@
# Model defaults for unsloth/Qwen3-14B
# Based on Qwen3_(14B).ipynb
# Also applies to: unsloth/Qwen3-14B-unsloth-bnb-4bit, Qwen/Qwen3-14B, unsloth/Qwen3-14B-bnb-4bit, Qwen/Qwen3-14B-FP8, unsloth/Qwen3-14B-FP8
# added inference parameters from Ollama
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.6
top_k: 20
top_p: 0.95

View file

@ -0,0 +1,53 @@
# Model defaults for unsloth/Qwen3-30B-A3B-Instruct-2507
# Based on Qwen3_MoE.py
# Also applies to: Qwen/Qwen3-30B-A3B-Instruct-2507, unsloth/Qwen3-30B-A3B-Instruct-2507-bnb-4bit
# MoE model - includes gate_up_proj for MoE layers
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 1
gradient_accumulation_steps: 1
warmup_steps: 5
max_steps: 50
save_steps: 50
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 64
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
- "gate_up_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.6
top_k: 20
top_p: 0.95

View file

@ -0,0 +1,52 @@
# Model defaults for unsloth/Qwen3-32B
# Based on Qwen3_(32B)_A100-Reasoning-Conversational.ipynb
# Also applies to: unsloth/Qwen3-32B-unsloth-bnb-4bit, Qwen/Qwen3-32B, unsloth/Qwen3-32B-bnb-4bit, Qwen/Qwen3-32B-FP8, unsloth/Qwen3-32B-FP8
# added inference parameters from Ollama
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.6
top_k: 20
top_p: 0.95

View file

@ -0,0 +1,53 @@
# Model defaults for unsloth/Qwen3-4B-Instruct-2507
# Based on Qwen3_(4B)-Instruct.ipynb
# Also applies to: unsloth/Qwen3-4B-Instruct-2507-unsloth-bnb-4bit, Qwen/Qwen3-4B-Instruct-2507, unsloth/Qwen3-4B-Instruct-2507-bnb-4bit, Qwen/Qwen3-4B-Instruct-2507-FP8, unsloth/Qwen3-4B-Instruct-2507-FP8
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.7
top_p: 0.80
top_k: 20
min_p: 0.00

View file

@ -0,0 +1,53 @@
# Model defaults for unsloth/Qwen3-4B-Thinking-2507
# Based on Qwen3_(4B)-Thinking.ipynb
# Also applies to: unsloth/Qwen3-4B-Thinking-2507-unsloth-bnb-4bit, Qwen/Qwen3-4B-Thinking-2507, unsloth/Qwen3-4B-Thinking-2507-bnb-4bit, Qwen/Qwen3-4B-Thinking-2507-FP8, unsloth/Qwen3-4B-Thinking-2507-FP8
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 32
lora_alpha: 32
lora_dropout: 0.0
target_modules:
- "q_proj"
- "k_proj"
- "v_proj"
- "o_proj"
- "gate_proj"
- "up_proj"
- "down_proj"
use_rslora: false
use_loftq: false
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.6
top_p: 0.95
top_k: 20
min_p: 0.00

View file

@ -0,0 +1,50 @@
# Model defaults for unsloth/Qwen3-VL-8B-Instruct
# Based on Qwen3_VL_(8B)-Vision.ipynb
# Also applies to: Qwen/Qwen3-VL-8B-Instruct-FP8, unsloth/Qwen3-VL-8B-Instruct-FP8, unsloth/Qwen3-VL-8B-Instruct, Qwen/Qwen3-VL-8B-Instruct, unsloth/Qwen3-VL-8B-Instruct-bnb-4bit
# added inference parameters from unsloth guides
training:
trust_remote_code: false
max_seq_length: 2048
# num_epochs: 4
num_epochs: 0
learning_rate: 2e-4
batch_size: 2
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 30
save_steps: 30
weight_decay: 0.001
random_seed: 3407
packing: false
train_on_completions: true
gradient_checkpointing: "unsloth"
optim: "adamw_8bit"
lr_scheduler_type: "linear"
lora:
lora_r: 16
lora_alpha: 16
lora_dropout: 0.0
target_modules:
- "all-linear"
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: "llm-finetuning"
enable_tensorboard: false
tensorboard_dir: "runs"
log_frequency: 10
inference:
trust_remote_code: false
temperature: 0.7
top_p: 0.8
top_k: 20

View file

@ -0,0 +1,42 @@
model: unsloth/Qwen2-VL-2B-Instruct-bnb-4bit
data:
dataset: philschmid/amazon-product-descriptions-vlm
format_type: auto
training:
training_type: lora
max_seq_length: 2048
load_in_4bit: true
output_dir: outputs
num_epochs: 1
learning_rate: 0.0002
batch_size: 1
gradient_accumulation_steps: 4
warmup_steps: 5
max_steps: 0
save_steps: 0
weight_decay: 0.01
random_seed: 3407
packing: false
train_on_completions: false
gradient_checkpointing: "unsloth"
lora:
lora_r: 64
lora_alpha: 16
lora_dropout: 0.0
target_modules: "" # vision uses vision_all_linear by default
vision_all_linear: true
use_rslora: false
use_loftq: false
finetune_vision_layers: true
finetune_language_layers: true
finetune_attention_modules: true
finetune_mlp_modules: true
logging:
enable_wandb: false
wandb_project: unsloth-training
enable_tensorboard: false
tensorboard_dir: runs

File diff suppressed because it is too large Load diff

View file

View file

@ -0,0 +1,47 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
"""
Authentication module for JWT-based auth with SQLite storage.
"""
from .authentication import (
create_access_token,
create_refresh_token,
refresh_access_token,
get_current_subject,
reload_secret,
)
from .storage import (
is_initialized,
create_initial_user,
get_user_and_secret,
load_jwt_secret,
save_setup_token,
consume_setup_token,
has_pending_setup_token,
save_refresh_token,
verify_refresh_token,
revoke_user_refresh_tokens,
)
from .hashing import hash_password, verify_password
__all__ = [
"create_access_token",
"create_refresh_token",
"refresh_access_token",
"get_current_subject",
"reload_secret",
"is_initialized",
"create_initial_user",
"get_user_and_secret",
"load_jwt_secret",
"save_setup_token",
"consume_setup_token",
"has_pending_setup_token",
"save_refresh_token",
"verify_refresh_token",
"revoke_user_refresh_tokens",
"hash_password",
"verify_password",
]

View file

@ -0,0 +1,108 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import secrets
from datetime import datetime, timedelta, timezone
from typing import Optional
from fastapi import Depends, HTTPException, status
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
import jwt
from .storage import load_jwt_secret, save_refresh_token, verify_refresh_token
ALGORITHM = "HS256"
ACCESS_TOKEN_EXPIRE_MINUTES = 60
REFRESH_TOKEN_EXPIRE_DAYS = 7
# Load stable secret from SQLite (set during first-time setup)
# This will raise RuntimeError if auth hasn't been initialized yet
try:
SECRET_KEY = load_jwt_secret()
except RuntimeError:
# Fallback: use a temporary secret until setup is complete
# This allows the app to start, but protected routes will fail until setup
SECRET_KEY = secrets.token_urlsafe(64)
security = HTTPBearer() # Reads Authorization: Bearer <token>
def create_access_token(
subject: str,
expires_delta: Optional[timedelta] = None,
) -> str:
"""
Create a signed JWT for the given subject (e.g. username).
Tokens are valid across restarts because SECRET_KEY is stored in SQLite.
"""
to_encode = {"sub": subject}
expire = datetime.now(timezone.utc) + (
expires_delta or timedelta(minutes = ACCESS_TOKEN_EXPIRE_MINUTES)
)
to_encode.update({"exp": expire})
return jwt.encode(to_encode, SECRET_KEY, algorithm = ALGORITHM)
def create_refresh_token(subject: str) -> str:
"""
Create a random refresh token, store its hash in SQLite, and return it.
Refresh tokens are opaque (not JWTs) and expire after REFRESH_TOKEN_EXPIRE_DAYS.
"""
token = secrets.token_urlsafe(48)
expires_at = datetime.now(timezone.utc) + timedelta(days = REFRESH_TOKEN_EXPIRE_DAYS)
save_refresh_token(token, subject, expires_at.isoformat())
return token
def refresh_access_token(refresh_token: str) -> Optional[str]:
"""
Validate a refresh token and issue a new access token.
The refresh token itself is NOT consumed it stays valid until expiry.
Returns a new access_token or None if the refresh token is invalid/expired.
"""
username = verify_refresh_token(refresh_token)
if username is None:
return None
return create_access_token(subject = username)
def reload_secret() -> None:
"""
Reload the JWT secret from SQLite.
Call this after setup to ensure new tokens use the persistent secret.
"""
global SECRET_KEY
SECRET_KEY = load_jwt_secret()
async def get_current_subject(
credentials: HTTPAuthorizationCredentials = Depends(security),
) -> str:
"""
FastAPI dependency to validate the JWT and return the subject.
Use this as a dependency on routes that should be protected, e.g.:
@router.get("/secure")
async def secure_endpoint(current_subject: str = Depends(get_current_subject)):
...
"""
token = credentials.credentials
try:
payload = jwt.decode(token, SECRET_KEY, algorithms = [ALGORITHM])
subject: Optional[str] = payload.get("sub")
if subject is None:
raise HTTPException(
status_code = status.HTTP_401_UNAUTHORIZED,
detail = "Invalid token payload",
)
return subject
except jwt.InvalidTokenError:
raise HTTPException(
status_code = status.HTTP_401_UNAUTHORIZED,
detail = "Invalid or expired token",
)

View file

@ -0,0 +1,43 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
"""
Password hashing utilities using PBKDF2.
"""
import hashlib
import hmac
import secrets
from typing import Tuple
def hash_password(password: str, salt: str | None = None) -> Tuple[str, str]:
"""
Hash a password using PBKDF2-HMAC-SHA256.
Returns (salt, hex_hash) tuple.
"""
if salt is None:
salt = secrets.token_hex(16)
dk = hashlib.pbkdf2_hmac(
"sha256",
password.encode("utf-8"),
salt.encode("utf-8"),
100_000, # 100k iterations
)
return salt, dk.hex()
def verify_password(password: str, salt: str, hashed: str) -> bool:
"""
Verify a password against a stored salt and hash.
Uses constant-time comparison to prevent timing attacks.
"""
dk = hashlib.pbkdf2_hmac(
"sha256",
password.encode("utf-8"),
salt.encode("utf-8"),
100_000,
)
return hmac.compare_digest(dk.hex(), hashed)

View file

@ -0,0 +1,263 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
"""
SQLite storage for authentication data (user credentials + JWT secret).
"""
import hashlib
import sqlite3
from datetime import datetime, timezone
from typing import Optional, Tuple
from utils.paths import auth_db_path, ensure_dir
DB_PATH = auth_db_path()
def _hash_token(token: str) -> str:
"""SHA-256 hash a setup token for safe storage."""
return hashlib.sha256(token.encode("utf-8")).hexdigest()
def get_connection() -> sqlite3.Connection:
"""Get a connection to the auth database, creating tables if needed."""
ensure_dir(DB_PATH.parent)
conn = sqlite3.connect(DB_PATH)
conn.row_factory = sqlite3.Row
conn.execute(
"""
CREATE TABLE IF NOT EXISTS auth_user (
id INTEGER PRIMARY KEY,
username TEXT UNIQUE NOT NULL,
password_salt TEXT NOT NULL,
password_hash TEXT NOT NULL,
jwt_secret TEXT NOT NULL
);
"""
)
conn.execute(
"""
CREATE TABLE IF NOT EXISTS setup_tokens (
id INTEGER PRIMARY KEY,
token_hash TEXT NOT NULL
);
"""
)
conn.execute(
"""
CREATE TABLE IF NOT EXISTS refresh_tokens (
id INTEGER PRIMARY KEY,
token_hash TEXT NOT NULL,
username TEXT NOT NULL,
expires_at TEXT NOT NULL
);
"""
)
conn.commit()
return conn
def is_initialized() -> bool:
"""Check if auth has been set up (user exists in DB)."""
conn = get_connection()
cur = conn.execute("SELECT COUNT(*) AS c FROM auth_user")
row = cur.fetchone()
conn.close()
return bool(row["c"])
def create_initial_user(username: str, password: str, jwt_secret: str) -> None:
"""
Create the initial admin user in the database.
Raises sqlite3.IntegrityError if username already exists.
"""
from .hashing import hash_password
salt, pwd_hash = hash_password(password)
conn = get_connection()
try:
conn.execute(
"""
INSERT INTO auth_user (username, password_salt, password_hash, jwt_secret)
VALUES (?, ?, ?, ?)
""",
(username, salt, pwd_hash, jwt_secret),
)
conn.commit()
finally:
conn.close()
def delete_user(username: str) -> None:
"""
Delete a user from the database.
Used for rollback when setup fails after user creation.
"""
conn = get_connection()
try:
conn.execute("DELETE FROM auth_user WHERE username = ?", (username,))
conn.commit()
finally:
conn.close()
def get_user_and_secret(username: str) -> Optional[Tuple[str, str, str]]:
"""
Get user's password salt, hash, and JWT secret.
Returns (password_salt, password_hash, jwt_secret) or None if user not found.
"""
conn = get_connection()
try:
cur = conn.execute(
"""
SELECT password_salt, password_hash, jwt_secret
FROM auth_user
WHERE username = ?
""",
(username,),
)
row = cur.fetchone()
if not row:
return None
return row["password_salt"], row["password_hash"], row["jwt_secret"]
finally:
conn.close()
def load_jwt_secret() -> str:
"""
Load the JWT secret from the database.
Raises RuntimeError if auth is not initialized.
"""
conn = get_connection()
try:
cur = conn.execute("SELECT jwt_secret FROM auth_user LIMIT 1")
row = cur.fetchone()
if not row:
raise RuntimeError(
"Auth is not initialized. Please set up a password first."
)
return row["jwt_secret"]
finally:
conn.close()
def save_setup_token(token: str) -> None:
"""
Store a hashed setup token, replacing any existing one.
"""
token_hash = _hash_token(token)
conn = get_connection()
try:
conn.execute("DELETE FROM setup_tokens")
conn.execute("INSERT INTO setup_tokens (token_hash) VALUES (?)", (token_hash,))
conn.commit()
finally:
conn.close()
def consume_setup_token(token: str) -> bool:
"""
Verify a setup token and delete it if valid.
Returns True if the token was valid (and is now consumed), False otherwise.
"""
token_hash = _hash_token(token)
conn = get_connection()
try:
cur = conn.execute(
"SELECT id FROM setup_tokens WHERE token_hash = ?", (token_hash,)
)
row = cur.fetchone()
if row is None:
return False
conn.execute("DELETE FROM setup_tokens WHERE id = ?", (row["id"],))
conn.commit()
return True
finally:
conn.close()
def has_pending_setup_token() -> bool:
"""Check if a setup token is waiting to be consumed."""
conn = get_connection()
try:
cur = conn.execute("SELECT COUNT(*) AS c FROM setup_tokens")
row = cur.fetchone()
return bool(row["c"])
finally:
conn.close()
def save_refresh_token(token: str, username: str, expires_at: str) -> None:
"""
Store a hashed refresh token with its associated username and expiry.
"""
token_hash = _hash_token(token)
conn = get_connection()
try:
conn.execute(
"""
INSERT INTO refresh_tokens (token_hash, username, expires_at)
VALUES (?, ?, ?)
""",
(token_hash, username, expires_at),
)
conn.commit()
finally:
conn.close()
def verify_refresh_token(token: str) -> Optional[str]:
"""
Verify a refresh token and return the username.
Returns the username if valid and not expired, None otherwise.
The token is NOT consumed it stays valid until it expires.
"""
token_hash = _hash_token(token)
conn = get_connection()
try:
# Clean up any expired tokens while we're here
conn.execute(
"DELETE FROM refresh_tokens WHERE expires_at < ?",
(datetime.now(timezone.utc).isoformat(),),
)
conn.commit()
cur = conn.execute(
"""
SELECT id, username, expires_at FROM refresh_tokens
WHERE token_hash = ?
""",
(token_hash,),
)
row = cur.fetchone()
if row is None:
return None
# Check expiry
expires_at = datetime.fromisoformat(row["expires_at"])
if datetime.now(timezone.utc) > expires_at:
conn.execute("DELETE FROM refresh_tokens WHERE id = ?", (row["id"],))
conn.commit()
return None
return row["username"]
finally:
conn.close()
def revoke_user_refresh_tokens(username: str) -> None:
"""Revoke all refresh tokens for a user (e.g. on logout)."""
conn = get_connection()
try:
conn.execute("DELETE FROM refresh_tokens WHERE username = ?", (username,))
conn.commit()
finally:
conn.close()

99
studio/backend/colab.py Normal file
View file

@ -0,0 +1,99 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
"""
Colab-specific helpers for running Unsloth Studio.
Uses Colab's built-in proxy - no external tunneling needed!
"""
from pathlib import Path
import sys
# Add backend to path early so local modules like loggers can be imported
backend_path = str(Path(__file__).parent)
if backend_path not in sys.path:
sys.path.insert(0, backend_path)
from loggers import get_logger
logger = get_logger(__name__)
def get_colab_url(port: int = 8000) -> str:
"""
Get the actual Colab proxy URL for a port.
"""
try:
from google.colab.output import eval_js
# Use Colab's proxy mechanism
url = eval_js(f"google.colab.kernel.proxyPort({port})", timeout_sec = 5)
return url if url else f"http://localhost:{port}"
except Exception as e:
logger.info(f"Note: Could not get Colab URL ({e})")
return f"http://localhost:{port}"
def show_link(port: int = 8000):
"""Display a styled clickable link to the UI."""
from IPython.display import display, HTML
# Get real Colab proxy URL
url = get_colab_url(port)
html = f"""
<div style="padding: 20px; background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
border-radius: 12px; margin: 10px 0; font-family: system-ui, -apple-system, sans-serif;">
<h2 style="color: white; margin: 0 0 12px 0; font-size: 24px;">
🦥 Unsloth Studio is Ready!
</h2>
<a href="{url}" target="_blank"
style="display: inline-block; padding: 14px 28px; background: white; color: #16a34a;
text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 16px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);">
🚀 Open Unsloth Studio
</a>
<p style="color: rgba(255,255,255,0.9); margin: 16px 0 0 0; font-size: 13px;
word-break: break-all; font-family: monospace;">
{url}
</p>
</div>
"""
display(HTML(html))
def start(port: int = 8000):
"""
Start Unsloth Studio server in Colab and display the URL.
Usage:
from colab import start
start()
"""
import sys
logger.info("🦥 Starting Unsloth Studio...")
logger.info(" Loading backend...")
from run import run_server
# Auto-detect frontend path
repo_root = Path(__file__).parent.parent
frontend_path = repo_root / "frontend" / "dist"
if not frontend_path.exists():
logger.info("❌ Frontend not built! Please run the setup cell first.")
return
logger.info(" Starting server...")
# Start server silently
run_server(host = "0.0.0.0", port = port, frontend_path = frontend_path, silent = True)
logger.info(" Server started!")
# Show the clickable link with real URL
show_link(port)
if __name__ == "__main__":
start()

View file

@ -0,0 +1,134 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
"""
Unified core module for Unsloth backend
Imports are LAZY (via __getattr__) so that training subprocesses can
import core.training.worker without pulling in heavy ML dependencies
like unsloth, transformers, or torch before the version activation
code has a chance to run.
"""
__all__ = [
# Inference
"InferenceBackend",
"get_inference_backend",
# Training
"get_training_backend",
"TrainingBackend",
"TrainingProgress",
# Config
"ModelConfig",
"is_vision_model",
"scan_trained_loras",
"load_model_defaults",
"get_base_model_from_lora",
# Utils
"format_and_template_dataset",
"normalize_path",
"is_local_path",
"is_model_cached",
"without_hf_auth",
"format_error_message",
"get_gpu_memory_info",
"log_gpu_memory",
"get_device",
"is_apple_silicon",
"clear_gpu_cache",
"DeviceType",
]
def __getattr__(name):
# Inference
if name in ("InferenceBackend", "get_inference_backend"):
from .inference import InferenceBackend, get_inference_backend
globals()["InferenceBackend"] = InferenceBackend
globals()["get_inference_backend"] = get_inference_backend
return globals()[name]
# Training
if name in ("TrainingBackend", "get_training_backend", "TrainingProgress"):
from .training import TrainingBackend, get_training_backend, TrainingProgress
globals()["TrainingBackend"] = TrainingBackend
globals()["get_training_backend"] = get_training_backend
globals()["TrainingProgress"] = TrainingProgress
return globals()[name]
# Config (from utils.models)
if name in (
"is_vision_model",
"ModelConfig",
"scan_trained_loras",
"load_model_defaults",
"get_base_model_from_lora",
):
from utils.models import (
is_vision_model,
ModelConfig,
scan_trained_loras,
load_model_defaults,
get_base_model_from_lora,
)
globals()["is_vision_model"] = is_vision_model
globals()["ModelConfig"] = ModelConfig
globals()["scan_trained_loras"] = scan_trained_loras
globals()["load_model_defaults"] = load_model_defaults
globals()["get_base_model_from_lora"] = get_base_model_from_lora
return globals()[name]
# Paths
if name in ("normalize_path", "is_local_path", "is_model_cached"):
from utils.paths import normalize_path, is_local_path, is_model_cached
globals()["normalize_path"] = normalize_path
globals()["is_local_path"] = is_local_path
globals()["is_model_cached"] = is_model_cached
return globals()[name]
# Utils
if name in ("without_hf_auth", "format_error_message"):
from utils.utils import without_hf_auth, format_error_message
globals()["without_hf_auth"] = without_hf_auth
globals()["format_error_message"] = format_error_message
return globals()[name]
# Hardware
if name in (
"get_device",
"is_apple_silicon",
"clear_gpu_cache",
"get_gpu_memory_info",
"log_gpu_memory",
"DeviceType",
):
from utils.hardware import (
get_device,
is_apple_silicon,
clear_gpu_cache,
get_gpu_memory_info,
log_gpu_memory,
DeviceType,
)
globals()["get_device"] = get_device
globals()["is_apple_silicon"] = is_apple_silicon
globals()["clear_gpu_cache"] = clear_gpu_cache
globals()["get_gpu_memory_info"] = get_gpu_memory_info
globals()["log_gpu_memory"] = log_gpu_memory
globals()["DeviceType"] = DeviceType
return globals()[name]
# Datasets
if name == "format_and_template_dataset":
from utils.datasets import format_and_template_dataset
globals()["format_and_template_dataset"] = format_and_template_dataset
return format_and_template_dataset
raise AttributeError(f"module 'core' has no attribute {name!r}")

View file

@ -0,0 +1,10 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
"""
Data Recipe core (DataDesigner wrapper + job runner).
"""
from .jobs import JobManager, get_job_manager
__all__ = ["JobManager", "get_job_manager"]

View file

@ -0,0 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
from .manager import JobManager, get_job_manager
__all__ = ["JobManager", "get_job_manager"]

View file

@ -0,0 +1,33 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
from __future__ import annotations
# stages parsed from data-designer logs
STAGE_CREATE = "create"
STAGE_PREVIEW = "preview"
STAGE_DAG = "dag"
STAGE_HEALTHCHECK = "healthcheck"
STAGE_SAMPLING = "sampling"
STAGE_COLUMN_CONFIG = "column_config"
STAGE_GENERATING = "generating"
STAGE_BATCH = "batch"
STAGE_PROFILING = "profiling"
USAGE_RESET_STAGES = {
STAGE_CREATE,
STAGE_PREVIEW,
STAGE_DAG,
STAGE_HEALTHCHECK,
STAGE_SAMPLING,
STAGE_GENERATING,
STAGE_PROFILING,
}
# job event types emitted by worker/manager
EVENT_JOB_ENQUEUED = "job.enqueued"
EVENT_JOB_STARTED = "job.started"
EVENT_JOB_CANCELLING = "job.cancelling"
EVENT_JOB_CANCELLED = "job.cancelled"
EVENT_JOB_COMPLETED = "job.completed"
EVENT_JOB_ERROR = "job.error"

Some files were not shown because too many files have changed in this diff Show more