Commit graph

4,672 commits

Author SHA1 Message Date
Manan17
47fc79df6d My changes for dataset 2026-02-25 08:15:44 +00:00
Manan17
60912e45e6 adding custom mapping according to the chat templates 2026-02-25 07:56:30 +00:00
imagineer99
0b47ab1eab fix: clip section card overflow to prevent background bleed at rounded corners 2026-02-25 03:54:40 +00:00
imagineer99
dbf5acf486 feat: filter pretraining datasets from search results 2026-02-25 03:00:40 +00:00
Roland Tannous
875c6c8094 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
a6f1153f9a 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
da8e58fb8f Merge pull request #30 from unslothai/feature/canvas-lab
Draft: Data Recipes graph editor WIP
2026-02-25 04:01:53 +04:00
Shine1i
773f7945a6 chore: squircle! tooltip 2026-02-25 00:55:35 +01:00
Shine1i
faa36e9abb 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
164560c6c9 feat: improve dark mode styling and simplify navbar 2026-02-25 00:31:20 +01:00
Roland Tannous
7adb69581e 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
2548720c01 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
929c7f86e4 feat: add animated theme toggler and refine dark mode styling 2026-02-25 00:18:20 +01:00
Manan17
fdbc60de77 adding custom mapping according to the chat templates 2026-02-24 21:15:56 +00:00
Leo Borcherding
a3daae1c40 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
0e7c8a2e5e 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
ef1cd3ac98 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
08aeeaee4b Fix llama-server: build in-tree, fix path resolution, add LD_LIBRARY_PATH 2026-02-24 18:19:29 +04:00
Roland Tannous
4e88092452 Preflight llama-server check before downloading remote GGUF files 2026-02-24 18:02:43 +04:00
Daniel Han
0f5a1fa7c3 Fix FP8 model loading: redirect to BF16 sibling for BNB/16-bit (#4095)
* Fix FP8 model loading for BNB/16-bit: redirect to BF16 sibling

Models like Ministral-3-3B-Instruct-2512 ship with FP8 weights and an FP8
quantization_config in their config.json. Loading these with BNB 4-bit/8-bit
fails because BNB cannot quantize FP8 tensors. Loading with 16-bit also fails
because the FP8 quantization config has activation_scheme=static which is
unsupported by transformers' FineGrainedFP8Config.

When an FP8 model is detected and the user is not explicitly requesting FP8
loading, check if a BF16 sibling repo exists (model_name + "-BF16") and
redirect to it. This happens early in the loading flow before any quantization
config processing.

Also pass the modified model_config to auto_model.from_pretrained to avoid
transformers re-reading the original config from the model repo.

Tested with Ministral-3-3B in 4-bit and 16-bit modes. Both now load and
train correctly.

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

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

* Simplify FP8 condition and narrow exception handling

Simplify the load_in_fp8 check (works for bool and string values).
Narrow inner except to KeyError and add comment for outer except.

* Warn user when FP8 model has no BF16 sibling for redirect

Previously the except block silently fell through with `pass`,
so users would get a confusing BNB dtype error later. Now prints
a clear message explaining the FP8 situation and suggesting
load_in_fp8=True or uploading a BF16 version.

* Fix FP8 redirect state corruption and add fbgemm_fp8 support

- Fix state corruption: model_name was reassigned before
  AutoConfig.from_pretrained, so if config fetch failed,
  model_name pointed to BF16 repo while auto_config still
  had FP8. Now only updates state after both checks succeed.
- Save original model_name so warning message is correct
  even on failure.
- Handle fbgemm_fp8 quant method in addition to fp8.

* Extract FP8 redirect to shared _redirect_fp8_to_bf16() in _utils.py

Addresses reviewer feedback:
- Move FP8 redirect logic to a shared function callable from both
  vision.py (FastBaseModel) and llama.py (FastLlamaModel)
- Raise RuntimeError instead of warning when BF16 sibling not found
- Add FP8 redirect to llama.py for text-only model loading path

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

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

* Add Ministral 3B/8B/14B mapper entries

Adds all 9 Ministral model variants to the mapper:
- Instruct (3B, 8B, 14B) with FP8 variant mappings
- Base (3B, 8B, 14B)
- Reasoning (3B, 8B, 14B)

This routes mistralai/Ministral-* to unsloth/Ministral-* repos
(BF16 weights), which also avoids the FP8 config issue for the
standard loading path through loader.py.

* Add FP8 mapper entries for Mistral-Small-3.2 and Magistral-Small-2509

---------

Co-authored-by: Ubuntu <ubuntu@ip-172-31-16-253.us-east-2.compute.internal>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-02-24 05:56:07 -08:00
Roland Tannous
a900eb9ad7 Fix GGUF detection for HuggingFace repo IDs (not just local paths) 2026-02-24 17:49:09 +04:00
Roland Tannous
70c912d788 Fix CUDA detection for llama-server build on multi-GPU machines 2026-02-24 17:45:17 +04:00
Roland Tannous
a40ebb1aab Add GGUF model inference via llama-server backend 2026-02-24 17:40:05 +04:00
Roland Tannous
3f34996288 Merge branch 'nightly' into feature/canvas-lab 2026-02-24 10:08:13 +00:00
Roland Tannous
7bbb1f0a0b 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
d38656139d 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
3ffbee3586 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
2149bc74ee 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
f5057d86ed use explicit float bounds for eval_steps input (0.0–1.0) 2026-02-24 09:31:30 +00:00
Roland Tannous
2be2933846 skip eval split and HF split detection when eval_steps is disabled 2026-02-24 09:26:54 +00:00
imagineer99
b8617a5544 feat: move cancel training button inside terminal startup card 2026-02-24 09:05:02 +00:00
Roland Tannous
c0f6012d77 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
8aca1cad29 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
002fe3d879 feat: improve training config UX and remove unused logging options 2026-02-24 08:22:02 +00:00
Shine1i
a4b7d360de chore: remove unused "Evaluate" navigation item and its icon from navbar 2026-02-24 09:09:56 +01:00
Shine1i
c8c844a4d6 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
dad78ae0ce feat: improve markdown note styles and layout logic 2026-02-24 04:04:02 +01:00
Shine1i
b80796a7cd 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
3989cd6524 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
ba000dc0f2 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
32d5cd7198 resolved unbound variable error 2026-02-23 17:37:23 -08:00
Manan17
aeb198f52d Fixing base model export issue for vlms 2026-02-24 01:34:11 +00:00
Manan17
4be677e45d Adding exported model for chat 2026-02-24 01:17:09 +00:00
pre-commit-ci[bot]
36181bad96 [pre-commit.ci] pre-commit autoupdate (#4096)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.15.1 → v0.15.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.15.1...v0.15.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-02-23 17:04:34 -08:00
Shine1i
dec6b4b224 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
5254f04065 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
9f574941f9 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
ad95b4a951 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
ab31aa9ed4 feat: add per-column seed drop support with UI integration, validation, and payload enhancements 2026-02-23 23:33:59 +01:00
Shine1i
54382c659c feat: add support for learning recipes with template loading, dialog integration, and enhanced payload handling 2026-02-23 23:20:32 +01:00