Commit graph

4,859 commits

Author SHA1 Message Date
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
Shine1i
71916f1dce feat: add ShineBorder UI component and learning recipe templates to enhance data recipes page 2026-02-23 22:38:06 +01:00
Shine1i
8739a01f56 Merge branch 'nightly' into feature/canvas-lab 2026-02-23 21:54:35 +01:00
Shine1i
b8231a6be6 refactor: keep seed block pos 2026-02-23 21:53:32 +01:00
Shine1i
1323e0af53 refactor: add batch processing support with configuration options and execution enhancements 2026-02-23 21:32:20 +01:00
Shine1i
59a15cb5bc 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
d4655eb8bf refactor: streamline recipe execution flows with validation support and enhanced run dialog interactions 2026-02-23 20:28:41 +01:00
Shine1i
91cbb0e933 refactor: improve dialog rendering and logging setup for stability and configurability 2026-02-23 20:16:03 +01:00
Leo Borcherding
cdeed53a97 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
6cedc339c6 feat: add Upload / Save / Reset training config from local YAML 2026-02-23 18:55:08 +00:00
Shine1i
71ab9ff4b4 refactor: enhance seed configuration handling with added fields, dynamic chunking logic, and streamlined interactions 2026-02-23 19:40:13 +01:00
Shine1i
424b00b701 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
3e17e2b0f6 refactor: enhance seed source handling with new source types and streamlined inspection flows 2026-02-23 18:46:02 +01:00
imagineer99
71d698d182 feat: sort and filter dataset search results by model type relevance 2026-02-23 16:22:45 +00:00