Repository Analysis

unslothai/unsloth

Unsloth Studio is a web UI for training and running open models like Gemma 4, Qwen3.6, DeepSeek, gpt-oss locally.

26.0 Moderate AI signal View on GitHub
26.0
Adjusted Score
26.0
Raw Score
100%
Time Factor
2026-05-30
Last Push
65,366
Stars
Python
Language
407,635
Lines of Code
1215
Files
7929
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 2HIGH 73MEDIUM 1481LOW 6373

Pattern Findings

7929 matches across 18 categories. Click a row to expand file-level details.

Decorative Section Separators1382 hits · 4575 pts
SeverityFileLineSnippet
MEDIUMinstall.sh1763# ── Radeon repo wheel selection helpers ──────────────────────────────────────
MEDIUMinstall.sh1869# ── Strix Halo / Strix Point: force rocm7.2 wheels, bypass Radeon repo ───────
MEDIUMstudio/setup.sh26# ── Maintainer-editable defaults ──────────────────────────────────────────
MEDIUMstudio/setup.sh39# ──────────────────────────────────────────────────────────────────────────
MEDIUMstudio/install_python_stack.py54# ── ROCm / AMD GPU support ─────────────────────────────────────────────────────
MEDIUMstudio/install_python_stack.py979# ── Color support ──────────────────────────────────────────────────────
MEDIUMstudio/frontend/src/config/env.ts14// ── Platform / device type ──────────────────────────────────
MEDIUM…rc/features/studio/sections/dataset-preview-dialog.tsx102 // ── AI Assist ──────────────────────────────────────────────────────
MEDIUMstudio/frontend/src/features/chat/api/chat-adapter.ts1615 // ── Audio model path (non-streaming) ─────────────────────
MEDIUM…dio/frontend/src/features/training/api/datasets-api.ts64// ── AI Assist ────────────────────────────────────────────────────────
MEDIUMstudio/frontend/src/features/export/api/export-api.ts135// ─────────────────────────────────────────────────────────────────────
MEDIUMstudio/frontend/src/features/export/api/export-api.ts137// ─────────────────────────────────────────────────────────────────────
MEDIUMstudio/frontend/src/components/assistant-ui/sources.tsx22// ── Helpers ──────────────────────────────────────────────────
MEDIUMstudio/frontend/src/components/assistant-ui/sources.tsx37// ── Sub-components ───────────────────────────────────────────
MEDIUMstudio/frontend/src/components/assistant-ui/sources.tsx127// ── Source badge with hover card ─────────────────────────────
MEDIUMstudio/frontend/src/components/assistant-ui/sources.tsx180// ── Grouped sources with 2-row collapse ─────────────────────
MEDIUMstudio/frontend/src/components/assistant-ui/sources.tsx320// ── Exports ──────────────────────────────────────────────────
MEDIUM…src/components/assistant-ui/model-selector/pickers.tsx205// ── GGUF Variant Expander ────────────────────────────────────
MEDIUM…src/components/assistant-ui/model-selector/pickers.tsx451// ── Detect GGUF repos by naming convention or hub tag ────────────────────
MEDIUM…src/components/assistant-ui/model-selector/pickers.tsx488// ── Hub Model Picker ──────────────────────────────────────────
MEDIUMstudio/frontend/src/lib/hf-cache.ts20// ── Cache & in-flight maps ──────────────────────────────────────
MEDIUMstudio/frontend/src/lib/hf-cache.ts37// ── Concurrency semaphore ───────────────────────────────────────
MEDIUMstudio/frontend/src/lib/hf-cache.ts63// ── Public API ──────────────────────────────────────────────────
MEDIUMstudio/backend/main.py15# ── Windows AMD ROCm DLL injection ──────────────────────────────────────────
MEDIUMstudio/backend/core/training/training.py164 # ------------------------------------------------------------------
MEDIUMstudio/backend/core/training/training.py166 # ------------------------------------------------------------------
MEDIUMstudio/backend/core/training/training.py462 # ------------------------------------------------------------------
MEDIUMstudio/backend/core/training/training.py464 # ------------------------------------------------------------------
MEDIUMstudio/backend/core/training/training.py495 # ------------------------------------------------------------------
MEDIUMstudio/backend/core/training/training.py497 # ------------------------------------------------------------------
MEDIUMstudio/backend/core/training/training.py871 # ------------------------------------------------------------------
MEDIUMstudio/backend/core/training/training.py873 # ------------------------------------------------------------------
MEDIUMstudio/backend/core/inference/audio_codecs.py73 # ── Lazy loaders ─────────────────────────────────────────────
MEDIUMstudio/backend/core/inference/audio_codecs.py178 # ── Decoders ─────────────────────────────────────────────────
MEDIUMstudio/backend/core/inference/audio_codecs.py335 # ── Cleanup ──────────────────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py1947 # ── Port allocation ───────────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py1956 # ── Stdout drain (prevents pipe deadlock on Windows) ─────────
MEDIUMstudio/backend/core/inference/llama_cpp.py4486 # ── Tool-calling agentic loop ──────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py5421 # ── TTS support ────────────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py98# ── Pre-compiled patterns for GGUF shard detection ───────────
MEDIUMstudio/backend/core/inference/llama_cpp.py103# ── Sliding-window-pattern resolver ───────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py705 # ── Properties ────────────────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py950 # ── Binary discovery ──────────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py1066 # ── llama-server capability probe ─────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py1216 # ── GPU allocation ────────────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py1287 # ── NVIDIA via nvidia-smi ────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py1595 # ── KV cache VRAM estimation ─────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py1894 # ── Variant fallback ────────────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py2263 # ── HF download (no lock held) ───────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py2596 # ── Lifecycle ─────────────────────────────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py2695 # ── Phase 1: kill old process (under lock, fast) ──────────
MEDIUMstudio/backend/core/inference/llama_cpp.py2748 # ── Phase 3: start llama-server (under lock) ──────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py4143 # ── Message building (OpenAI format) ──────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py4186 # ── Generation (proxy to llama-server) ────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py4541 # ── Duplicate tool-call detection ────────────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py4548 # ── Re-prompt on plan-without-action ─────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py4600 # ── Speculative buffer state machine ──────────────────
MEDIUMstudio/backend/core/inference/llama_cpp.py5135 # ── Duplicate call detection ──────────────
MEDIUMstudio/backend/core/inference/orchestrator.py163 # ------------------------------------------------------------------
MEDIUMstudio/backend/core/inference/orchestrator.py165 # ------------------------------------------------------------------
1322 more matches not shown…
Hyper-Verbose Identifiers3583 hits · 3073 pts
SeverityFileLineSnippet
LOWstudio/install_llama_prebuilt.py547def atomic_replace_from_tempfile(tmp_path: Path, destination: Path) -> None:
LOWstudio/install_llama_prebuilt.py552def source_archive_logical_name(upstream_tag: str) -> str:
LOWstudio/install_llama_prebuilt.py556def exact_source_archive_logical_name(source_commit: str) -> str:
LOWstudio/install_llama_prebuilt.py2537def exact_source_archive_hash(
LOWstudio/install_llama_prebuilt.py2547def source_clone_url_from_checksums(checksums: ApprovedReleaseChecksums) -> str | None:
LOWstudio/install_llama_prebuilt.py2551def source_build_plan_for_release(
LOWstudio/install_llama_prebuilt.py50def windows_hidden_subprocess_kwargs() -> dict[str, object]:
LOWstudio/install_llama_prebuilt.py111def _lemonade_release_api_for(llama_tag: str) -> str:
LOWstudio/install_llama_prebuilt.py583def normalize_source_ref_kind(value: str | None) -> str | None:
LOWstudio/install_llama_prebuilt.py637def source_url_from_repo_slug(repo_slug: str | None) -> str | None:
LOWstudio/install_llama_prebuilt.py726def windows_cuda_upstream_asset_names(llama_tag: str, runtime: str) -> list[str]:
LOWstudio/install_llama_prebuilt.py733def windows_cuda_asset_aliases(
LOWstudio/install_llama_prebuilt.py1051def upstream_source_archive_urls(tag: str) -> list[str]:
LOWstudio/install_llama_prebuilt.py1059def commit_source_archive_urls(repo: str, source_commit: str) -> list[str]:
LOWstudio/install_llama_prebuilt.py1109def latest_upstream_release_tag() -> str:
LOWstudio/install_llama_prebuilt.py1141def iter_release_payloads_by_time(
LOWstudio/install_llama_prebuilt.py1182def direct_release_matches_request(
LOWstudio/install_llama_prebuilt.py1193def synthetic_checksums_for_release(
LOWstudio/install_llama_prebuilt.py1204def parse_direct_linux_release_bundle(
LOWstudio/install_llama_prebuilt.py1285def direct_linux_release_plan(
LOWstudio/install_llama_prebuilt.py1361def direct_upstream_release_plan(
LOWstudio/install_llama_prebuilt.py1517def resolve_simple_install_release_plans(
LOWstudio/install_llama_prebuilt.py1578def normalized_requested_llama_tag(requested_tag: str | None) -> str:
LOWstudio/install_llama_prebuilt.py1618def parse_cuda_visible_devices(value: str | None) -> list[str] | None:
LOWstudio/install_llama_prebuilt.py1627def supports_explicit_visible_device_matching(
LOWstudio/install_llama_prebuilt.py1673def dir_provides_exact_library(directory: str | Path, library: str) -> bool:
LOWstudio/install_llama_prebuilt.py1680def linux_runtime_dirs_for_required_libraries(
LOWstudio/install_llama_prebuilt.py1748def detected_linux_runtime_lines() -> tuple[list[str], dict[str, list[str]]]:
LOWstudio/install_llama_prebuilt.py1855def parse_published_release_bundle(
LOWstudio/install_llama_prebuilt.py1961def parse_approved_release_checksums(
LOWstudio/install_llama_prebuilt.py2055def load_approved_release_checksums(
LOWstudio/install_llama_prebuilt.py2082def iter_published_release_bundles(
LOWstudio/install_llama_prebuilt.py2106def linux_cuda_choice_from_release(
LOWstudio/install_llama_prebuilt.py2314def latest_published_linux_cuda_tag(host: HostInfo, published_repo: str) -> str | None:
LOWstudio/install_llama_prebuilt.py2330def pinned_published_release_bundle(
LOWstudio/install_llama_prebuilt.py2341def validated_checksums_for_bundle(
LOWstudio/install_llama_prebuilt.py2359def published_release_matches_request(
LOWstudio/install_llama_prebuilt.py2375def resolve_published_release(
LOWstudio/install_llama_prebuilt.py2425def iter_resolved_published_releases(
LOWstudio/install_llama_prebuilt.py2486def resolve_requested_llama_tag(
LOWstudio/install_llama_prebuilt.py2525def resolve_requested_install_tag(
LOWstudio/install_llama_prebuilt.py2612def resolve_source_build_plan(
LOWstudio/install_llama_prebuilt.py2931def pick_windows_cuda_runtime(host: HostInfo) -> str | None:
LOWstudio/install_llama_prebuilt.py2942def compatible_linux_runtime_lines(host: HostInfo) -> list[str]:
LOWstudio/install_llama_prebuilt.py2953def windows_runtime_line_info() -> dict[str, tuple[str, ...]]:
LOWstudio/install_llama_prebuilt.py2960def detected_windows_runtime_lines() -> tuple[list[str], dict[str, list[str]]]:
LOWstudio/install_llama_prebuilt.py2972def compatible_windows_runtime_lines(host: HostInfo) -> list[str]:
LOWstudio/install_llama_prebuilt.py2981def runtime_line_from_cuda_version(cuda_version: str | None) -> str | None:
LOWstudio/install_llama_prebuilt.py2995def detect_torch_cuda_runtime_preference(host: HostInfo) -> CudaRuntimePreference:
LOWstudio/install_llama_prebuilt.py3193def published_windows_cuda_attempts(
LOWstudio/install_llama_prebuilt.py3271def resolve_windows_cuda_choices(
LOWstudio/install_llama_prebuilt.py3285def resolve_linux_cuda_choice(
LOWstudio/install_llama_prebuilt.py3300def published_asset_choice_for_kind(
LOWstudio/install_llama_prebuilt.py3332def _detect_host_rocm_version() -> tuple[int, int] | None:
LOWstudio/install_llama_prebuilt.py3445def _is_trusted_github_release_url(url: str, expected_repo: str) -> bool:
LOWstudio/install_llama_prebuilt.py3476def _fetch_lemonade_release_cached(api_url: str, llama_tag: str) -> "dict | None":
LOWstudio/install_llama_prebuilt.py3500def resolve_lemonade_rocm_choice(
LOWstudio/install_llama_prebuilt.py3605def resolve_upstream_asset_choice(host: HostInfo, llama_tag: str) -> AssetChoice:
LOWstudio/install_llama_prebuilt.py3777def resolve_release_asset_choice(
LOWstudio/install_llama_prebuilt.py3853 def _try_repair_missing_slash(
3523 more matches not shown…
Unused Imports983 hits · 826 pts
SeverityFileLineSnippet
LOWstudio/install_llama_prebuilt.py7
LOWstudio/install_python_stack.py13
LOWstudio/backend/run.py35
LOWstudio/backend/startup_banner.py9
LOWstudio/backend/colab.py18
LOWstudio/backend/main.py139
LOWstudio/backend/main.py227
LOWstudio/backend/main.py248
LOWstudio/backend/loggers/__init__.py4
LOWstudio/backend/core/data_recipe/service.py4
LOWstudio/backend/core/data_recipe/__init__.py8
LOWstudio/backend/core/data_recipe/__init__.py8
LOWstudio/backend/core/data_recipe/jsonable.py4
LOW…/backend/core/data_recipe/local_callable_validators.py4
LOW…/backend/core/data_recipe/local_callable_validators.py7
LOW…/backend/core/data_recipe/local_callable_validators.py8
LOWstudio/backend/core/data_recipe/huggingface.py4
LOWstudio/backend/core/data_recipe/jobs/worker.py4
LOWstudio/backend/core/data_recipe/jobs/worker.py7
LOWstudio/backend/core/data_recipe/jobs/worker.py8
LOWstudio/backend/core/data_recipe/jobs/constants.py4
LOWstudio/backend/core/data_recipe/jobs/__init__.py4
LOWstudio/backend/core/data_recipe/jobs/__init__.py4
LOWstudio/backend/core/data_recipe/jobs/types.py4
LOWstudio/backend/core/data_recipe/jobs/parse.py4
LOWstudio/backend/core/data_recipe/jobs/manager.py4
LOWstudio/backend/core/training/worker.py14
LOWstudio/backend/core/training/worker.py16
LOWstudio/backend/core/training/worker.py433
LOWstudio/backend/core/training/worker.py434
LOWstudio/backend/core/training/worker.py674
LOWstudio/backend/core/training/worker.py675
LOWstudio/backend/core/training/worker.py2995
LOWstudio/backend/core/training/worker.py2012
LOWstudio/backend/core/training/__init__.py8
LOWstudio/backend/core/training/__init__.py8
LOWstudio/backend/core/training/__init__.py8
LOWstudio/backend/core/training/trainer.py36
LOWstudio/backend/core/training/trainer.py50
LOWstudio/backend/core/training/trainer.py56
LOWstudio/backend/core/training/trainer.py62
LOWstudio/backend/core/training/trainer.py65
LOWstudio/backend/core/training/trainer.py2805
LOWstudio/backend/core/training/trainer.py2806
LOWstudio/backend/core/training/trainer.py2806
LOWstudio/backend/core/training/trainer.py2806
LOWstudio/backend/core/training/trainer.py2813
LOWstudio/backend/core/training/trainer.py2813
LOWstudio/backend/core/training/training.py25
LOWstudio/backend/core/training/training.py26
LOWstudio/backend/core/training/training.py29
LOWstudio/backend/core/inference/worker.py17
LOWstudio/backend/core/inference/worker.py20
LOWstudio/backend/core/inference/worker.py808
LOWstudio/backend/core/inference/llama_server_args.py15
LOWstudio/backend/core/inference/mlx_inference.py9
LOWstudio/backend/core/inference/audio_codecs.py13
LOWstudio/backend/core/inference/__init__.py12
LOWstudio/backend/core/inference/__init__.py13
LOWstudio/backend/core/inference/llama_cpp.py17
923 more matches not shown…
Excessive Try-Catch Wrapping987 hits · 818 pts
SeverityFileLineSnippet
LOWstudio/setup.sh175except Exception:
LOWstudio/install_llama_prebuilt.py438 except Exception:
LOWstudio/install_llama_prebuilt.py909 except Exception as exc:
LOWstudio/install_llama_prebuilt.py1000 except Exception as exc:
LOWstudio/install_llama_prebuilt.py1005 except Exception:
LOWstudio/install_llama_prebuilt.py1165 except Exception:
LOWstudio/install_llama_prebuilt.py1564 except Exception as exc:
LOWstudio/install_llama_prebuilt.py2060 except Exception as exc:
LOWstudio/install_llama_prebuilt.py2075 except Exception as exc:
LOWstudio/install_llama_prebuilt.py2097 except Exception as exc:
LOWstudio/install_llama_prebuilt.py2519 except Exception:
LOWstudio/install_llama_prebuilt.py2626 except Exception:
LOWstudio/install_llama_prebuilt.py2645 except Exception:
LOWstudio/install_llama_prebuilt.py2774 except Exception:
LOWstudio/install_llama_prebuilt.py2792 except Exception:
LOWstudio/install_llama_prebuilt.py2837 except Exception:
LOWstudio/install_llama_prebuilt.py2865 except Exception:
LOWstudio/install_llama_prebuilt.py2901 except Exception:
LOWstudio/install_llama_prebuilt.py3008 except Exception as exc:
LOWstudio/install_llama_prebuilt.py3021 except Exception as exc:
LOWstudio/install_llama_prebuilt.py3353 except Exception:
LOWstudio/install_llama_prebuilt.py3369 except Exception:
LOWstudio/install_llama_prebuilt.py3390 except Exception:
LOWstudio/install_llama_prebuilt.py3413 except Exception:
LOWstudio/install_llama_prebuilt.py3459 except Exception:
LOWstudio/install_llama_prebuilt.py3488 except Exception as exc:
LOWstudio/install_llama_prebuilt.py4122 except Exception as exc:
LOWstudio/install_llama_prebuilt.py4150 except Exception as exc:
LOWstudio/install_llama_prebuilt.py4200 except Exception:
LOWstudio/install_llama_prebuilt.py4289 except Exception:
LOWstudio/install_llama_prebuilt.py4403 except Exception as exc:
LOWstudio/install_llama_prebuilt.py4427 except Exception as exc:
LOWstudio/install_llama_prebuilt.py4476 except Exception as exc:
LOWstudio/install_llama_prebuilt.py4504 except Exception as rollback_exc:
LOWstudio/install_llama_prebuilt.py4519 except Exception as cleanup_exc:
LOWstudio/install_llama_prebuilt.py4536 except Exception as cleanup_exc:
LOWstudio/install_llama_prebuilt.py4695 except Exception as exc:
LOWstudio/install_llama_prebuilt.py4711 except Exception as exc:
LOWstudio/install_llama_prebuilt.py4792 except Exception:
LOWstudio/install_llama_prebuilt.py4811 except Exception:
LOWstudio/install_llama_prebuilt.py4817 except Exception:
LOWstudio/install_llama_prebuilt.py4851 except Exception:
LOWstudio/install_llama_prebuilt.py5167 except Exception as exc:
LOWstudio/install_llama_prebuilt.py5190 except Exception:
LOWstudio/install_llama_prebuilt.py5234 except Exception as exc:
LOWstudio/install_llama_prebuilt.py5269 except Exception as exc:
LOWstudio/install_llama_prebuilt.py5296 except Exception as exc:
LOWstudio/install_llama_prebuilt.py5620 except Exception:
LOWstudio/install_llama_prebuilt.py5726 except Exception:
LOWstudio/install_llama_prebuilt.py5745 except Exception:
LOWstudio/install_llama_prebuilt.py5928 except Exception as exc:
LOWstudio/install_llama_prebuilt.py6046 except Exception as exc:
LOWstudio/install_llama_prebuilt.py6247 except Exception as exc:
LOWstudio/install_python_stack.py161 except Exception:
LOWstudio/install_python_stack.py181 except Exception:
LOWstudio/install_python_stack.py203 except Exception:
LOWstudio/install_python_stack.py229 except Exception:
LOWstudio/install_python_stack.py320 except Exception:
LOWstudio/install_python_stack.py348 except Exception:
LOWstudio/install_python_stack.py418 except Exception:
927 more matches not shown…
Deep Nesting443 hits · 321 pts
SeverityFileLineSnippet
LOWunsloth-cli.py36
LOWstudio/install_llama_prebuilt.py876
LOWstudio/install_llama_prebuilt.py919
LOWstudio/install_llama_prebuilt.py964
LOWstudio/install_llama_prebuilt.py1361
LOWstudio/install_llama_prebuilt.py1517
LOWstudio/install_llama_prebuilt.py1748
LOWstudio/install_llama_prebuilt.py2744
LOWstudio/install_llama_prebuilt.py3193
LOWstudio/install_llama_prebuilt.py3332
LOWstudio/install_llama_prebuilt.py3605
LOWstudio/install_llama_prebuilt.py4011
LOWstudio/install_llama_prebuilt.py4085
LOWstudio/install_llama_prebuilt.py4275
LOWstudio/install_llama_prebuilt.py4460
LOWstudio/install_llama_prebuilt.py5040
LOWstudio/install_llama_prebuilt.py5197
LOWstudio/install_llama_prebuilt.py5441
LOWstudio/install_llama_prebuilt.py5950
LOWstudio/install_python_stack.py145
LOWstudio/install_python_stack.py265
LOWstudio/install_python_stack.py388
LOWstudio/install_python_stack.py1411
LOWstudio/backend/run.py172
LOWstudio/backend/run.py337
LOWstudio/backend/run.py365
LOWstudio/backend/run.py529
LOWstudio/backend/run.py610
LOWstudio/backend/main.py23
LOWstudio/backend/loggers/config.py36
LOWstudio/backend/core/tool_healing.py42
LOWstudio/backend/core/data_recipe/jobs/manager.py467
LOWstudio/backend/core/training/worker.py181
LOWstudio/backend/core/training/worker.py1128
LOWstudio/backend/core/training/worker.py1255
LOWstudio/backend/core/training/worker.py1814
LOWstudio/backend/core/training/worker.py2967
LOWstudio/backend/core/training/worker.py85
LOWstudio/backend/core/training/worker.py2672
LOWstudio/backend/core/training/worker.py2339
LOWstudio/backend/core/training/trainer.py455
LOWstudio/backend/core/training/trainer.py505
LOWstudio/backend/core/training/trainer.py929
LOWstudio/backend/core/training/trainer.py1377
LOWstudio/backend/core/training/trainer.py1560
LOWstudio/backend/core/training/trainer.py1997
LOWstudio/backend/core/training/trainer.py2354
LOWstudio/backend/core/training/trainer.py2704
LOWstudio/backend/core/training/trainer.py2858
LOWstudio/backend/core/training/training.py499
LOWstudio/backend/core/training/training.py541
LOWstudio/backend/core/training/training.py875
LOWstudio/backend/core/inference/worker.py96
LOWstudio/backend/core/inference/worker.py247
LOWstudio/backend/core/inference/worker.py659
LOWstudio/backend/core/inference/mlx_inference.py168
LOWstudio/backend/core/inference/mlx_inference.py237
LOWstudio/backend/core/inference/mlx_inference.py320
LOWstudio/backend/core/inference/tool_call_parser.py88
LOWstudio/backend/core/inference/tools.py151
383 more matches not shown…
Cross-Language Confusion44 hits · 230 pts
SeverityFileLineSnippet
HIGHstudio/backend/tests/test_anthropic_fast_mode_edge.py38 b'"role":"assistant","stop_reason":null,"usage":'
HIGHstudio/backend/tests/test_anthropic_fast_mode_edge.py50 b'"role":"assistant","stop_reason":null,"usage":'
HIGHstudio/backend/tests/test_anthropic_fast_mode_edge.py397 b'"role":"assistant","stop_reason":null,"usage":'
HIGHstudio/backend/tests/test_anthropic_fast_mode_edge.py333 finish_reason=null); the frontend latches on
HIGH…/backend/tests/test_anthropic_fast_mode_and_refusal.py38 b'"stop_reason":null,"usage":{"input_tokens":1,"output_tokens":1}}}\n\n'
HIGH…/backend/tests/test_anthropic_fast_mode_and_refusal.py49 b'"stop_reason":null,"usage":{"input_tokens":1,"output_tokens":1}}}\n\n'
HIGHstudio/backend/tests/test_sandbox_tools.py376 assert self._find()("cat README.md && echo source") == set()
HIGHstudio/backend/tests/test_sandbox_tools.py377 assert "source" not in self._find()("cat README.md && echo source")
HIGHstudio/backend/tests/test_sandbox_tools.py378 assert "echo" not in self._find()("cat README.md && echo source")
HIGHstudio/backend/tests/test_sandbox_tools.py402 assert "wget" in self._find()("cd /tmp && wget https://bad")
HIGHstudio/backend/routes/inference.py1489 Returns an empty payload (``phase=null, bytes=0``) when no load is
HIGHtests/studio/test_frontend_dep_removal.py448 '/** @type {import("react").FC} */\nconst Foo = () => null;',
HIGHtests/studio/test_frontend_dep_removal.py878 '/** @type {import("__adv_only_pkg_l__").Foo} */\n' "const x = null;\n",
HIGHtests/studio/test_frontend_dep_removal.py1542 {"build": "tsc -b && cross-env CI=1 biome check"},
HIGHtests/studio/_playwright_robust.py467 if (body !== null) opts.body = body;
HIGHtests/studio/_playwright_robust.py477 parsed = null;
HIGHtests/studio/_playwright_robust.py480 return {status: r.status, body: parsed, error: null};
HIGHtests/studio/_playwright_robust.py483 return {status: 0, body: null, error: String(e)};
HIGHtests/studio/_playwright_robust.py111 (document.head || document.documentElement).appendChild(style);
HIGHtests/studio/_playwright_robust.py389 """() => (document.body && document.body.innerText || '').slice(0, 800)""",
HIGHtests/studio/playwright_chat_ime_i18n.py526 try { form && form.requestSubmit(); } catch (e) {}
HIGHtests/studio/playwright_chat_ime_i18n.py591 const form = ta && ta.closest('form');
HIGHtests/studio/test_chat_preset_builtin_invariants.py99 matches: def ? isSamePresetConfig(def.params, DEFAULT_INFERENCE_PARAMS) : null,
HIGHtests/studio/install/test_pr4562_bugfixes.py420 if ! command -v cmake &>/dev/null; then
HIGHtests/studio/install/test_pr4562_bugfixes.py422 elif ! command -v git &>/dev/null; then
HIGHtests/studio/install/test_pr4562_bugfixes.py454 if ! command -v cmake &>/dev/null; then
HIGHtests/studio/install/test_pr4562_bugfixes.py456 elif ! command -v git &>/dev/null; then
HIGHtests/studio/install/test_pr4562_bugfixes.py484 if ! command -v cmake &>/dev/null; then
HIGHtests/studio/install/test_pr4562_bugfixes.py486 elif ! command -v git &>/dev/null; then
HIGHtests/studio/install/test_pr4562_bugfixes.py1064 cmake -S "$_BUILD_TMP" -B "$_BUILD_TMP/build" $CPU_FALLBACK_CMAKE_ARGS || BUILD_OK=false
HIGHtests/studio/install/test_pr4562_bugfixes.py1156 cmake $CMAKE_GENERATOR_ARGS -S "$_BUILD_TMP" -B "$_BUILD_TMP/build" $CPU_FALLBACK_CMAKE_ARGS || BUIL
HIGHtests/python/test_tokenizers_and_torch_constraint.py147 "import sys; print(sys.version_info.minor)" 2>/dev/null || echo "0")
HIGHtests/python/test_tokenizers_and_torch_constraint.py148 if [ "$_PY_MINOR" -ge 13 ] 2>/dev/null; then
HIGHtests/python/test_tokenizers_and_torch_constraint.py299 "import sys; print(sys.version_info.minor)" 2>/dev/null || echo "0")
HIGHtests/python/test_tokenizers_and_torch_constraint.py300 if [ "$_PY_MINOR" -ge 13 ] 2>/dev/null; then
HIGHtests/python/test_tokenizers_and_torch_constraint.py345 "import sys; print(sys.version_info.minor)" 2>/dev/null || echo "0")
HIGHtests/python/test_tokenizers_and_torch_constraint.py346 if [ "$_PY_MINOR" -ge 13 ] 2>/dev/null; then
HIGHtests/python/test_e2e_no_torch_sandbox.py1204 """GET /api/system/hardware returns torch=null, gpu_name=null."""
HIGHtests/utils/os_utils.py88 "apt": f"sudo apt update && sudo apt install {package_name}",
HIGHunsloth/save.py1259 f"cd llama.cpp && git reset --hard {version} && git clean -df",
HIGHunsloth/save.py1602 build_instructions = f'cd "{LLAMA_CPP_DEFAULT_DIR}" && make clean && make all -j'
HIGHunsloth/_auto_install.py43print(f'pip install --upgrade pip && pip install --no-deps git+https://github.com/unslothai/unsloth-zoo.git && pip insta
HIGHunsloth/trainer.py120 "`pip uninstall transformers -y && pip install --upgrade --no-cache-dir transformers`"
HIGHunsloth/trainer.py125 "`pip uninstall transformers -y && pip install --upgrade --no-cache-dir transformers`"
Over-Commented Block257 hits · 204 pts
SeverityFileLineSnippet
LOWinstall.sh1#!/bin/sh
LOWinstall.sh521 _css_gem_png="$_css_data_dir/unsloth-gem.png"
LOWinstall.sh2121 # wheels if necessary to ensure a compatible set.
LOWstudio/setup.sh21 ;;
LOWstudio/setup.sh361 done
LOWstudio/__init__.py1# SPDX-License-Identifier: AGPL-3.0-only
LOWstudio/install_llama_prebuilt.py4821 if not root.is_dir():
LOWstudio/install_python_stack.py1081 _step("error", f"{label} failed (exit code {result.returncode})", _red)
LOWstudio/install_python_stack.py1701
LOW…io/frontend/src/features/settings/tabs/general-tab.tsx21import { useEffect, useRef, useState } from "react";
LOWstudio/frontend/src/features/chat/shared-composer.tsx421 // clickable for Kimi, but turning one on flips the other off — the
LOW…rontend/src/features/chat/stores/chat-runtime-store.ts761 setCheckpoint: (modelId, ggufVariant) =>
LOW…/features/chat/components/openai-code-exec-section.tsx121 // creates more confusion than it solves. Refreshing the page resets
LOW…/features/chat/components/openai-code-exec-section.tsx281 // on the user's OpenAI account. Sorting by `lastActiveAt` matches
LOW…omponents/assistant-ui/use-intent-aware-autoscroll.tsx181 // skip extendFollow and auto-follow stays dead for the session.
LOW…omponents/assistant-ui/use-intent-aware-autoscroll.tsx341 // Upward: sum across events. Middle-click autoscroll and
LOW…omponents/assistant-ui/use-intent-aware-autoscroll.tsx361
LOW…omponents/assistant-ui/use-intent-aware-autoscroll.tsx381 // already happened and `scrollTop` cannot be pushed past the new
LOW…omponents/assistant-ui/use-intent-aware-autoscroll.tsx481 // ever unmounted and remounted without an AUI lifecycle event
LOWstudio/backend/__init__.py1# SPDX-License-Identifier: AGPL-3.0-only
LOWstudio/backend/main.py61 pass
LOWstudio/backend/core/training/worker.py1941 and (_lowered.startswith("unsloth/") or _lowered.startswith("nvidia/"))
LOWstudio/backend/core/training/worker.py2021
LOWstudio/backend/core/training/worker.py2161 sys.modules["torch.distributed"] = _td_mock
LOWstudio/backend/core/training/worker.py2181 # We gate the dispatch override on HIP < 7.13 so users on the fixed wheel get
LOWstudio/backend/core/training/worker.py2421 "skipping Python fallback (AMD fixed gfx1200 null kernel in ROCm 7.13)"
LOWstudio/backend/core/training/worker.py2621 # print(
LOWstudio/backend/core/training/trainer.py3561 # print("[DEBUG] === After train_on_completions ===", flush = True)
LOWstudio/backend/core/inference/mlx_inference.py81 # GGUF guard. GGUF models are served via llama-server in the
LOWstudio/backend/core/inference/external_provider.py21
LOWstudio/backend/core/inference/external_provider.py1801 }
LOWstudio/backend/core/inference/external_provider.py1861 # `input_document` is Studio's normalised content type
LOWstudio/backend/core/inference/external_provider.py2121 # Anthropic rejects top_k whenever thinking is enabled.
LOWstudio/backend/core/inference/external_provider.py2361 # NOTE: same manual __anext__ loop as stream_chat_completion — see comment there.
LOWstudio/backend/core/inference/external_provider.py2381 # carries name="web_fetch" and the result block is
LOWstudio/backend/core/inference/external_provider.py2401 # Deduped by type-specific anchor key; inline [N] is
LOWstudio/backend/core/inference/external_provider.py2721 elif delta_type == "text_delta":
LOWstudio/backend/core/inference/external_provider.py3601 _native_part, dict
LOWstudio/backend/core/inference/external_provider.py3681 if role == "tool":
LOWstudio/backend/core/inference/external_provider.py3821 # Image-tier model IDs reject text-only tools (code_execution,
LOWstudio/backend/core/inference/external_provider.py4281 # final finish_reason swaps STOP -> tool_calls (matches the
LOWstudio/backend/core/inference/external_provider.py5261 # temperature and top_p with `Unsupported parameter` 400s on
LOWstudio/backend/core/inference/external_provider.py5541 function_call_index = 0
LOWstudio/backend/core/inference/llama_cpp.py81
LOWstudio/backend/core/inference/llama_cpp.py1341 return []
LOWstudio/backend/core/inference/llama_cpp.py2821 and not _mtp_sub_3b_for_fit
LOWstudio/backend/core/inference/llama_cpp.py3061 # ngram-mod: ~16 MB shared hash pool, constant memory/complexity,
LOWstudio/backend/core/inference/llama_cpp.py4541 # ── Duplicate tool-call detection ────────────────────────
LOWstudio/backend/core/inference/providers.py61 "anthropic-version": "2023-06-01",
LOWstudio/backend/core/export/worker.py381 # print and every child process inherits the redirected fds. This
LOWstudio/backend/core/export/orchestrator.py61 self.is_peft: bool = False
LOW…po-seed/src/data_designer_github_repo_seed/__init__.py1# SPDX-License-Identifier: AGPL-3.0-only
LOW…ata_designer_github_repo_seed/scraper_impl/__init__.py1# SPDX-License-Identifier: AGPL-3.0-only
LOW…nd/plugins/data-designer-unstructured-seed/__init__.py1# SPDX-License-Identifier: AGPL-3.0-only
LOWstudio/backend/tests/test_anthropic_compaction.py341 # Codex P1: once context_management is enabled and Anthropic runs
LOWstudio/backend/tests/test_openai_tool_passthrough.py301
LOWstudio/backend/tests/__init__.py1# SPDX-License-Identifier: AGPL-3.0-only
LOWstudio/backend/tests/test_training_worker_flash_attn.py941 )
LOWstudio/backend/utils/__init__.py1# SPDX-License-Identifier: AGPL-3.0-only
LOWstudio/backend/utils/hardware/hardware.py1901 # Keep ROCm visibility env vars in sync so _get_parent_visible_gpu_spec()
197 more matches not shown…
Redundant / Tautological Comments112 hits · 149 pts
SeverityFileLineSnippet
LOWstudio/install_llama_prebuilt.py4296 # Check if the holder process is still alive
LOWstudio/backend/core/training/trainer.py1015 # Check if model has the expected attributes
LOWstudio/backend/core/training/trainer.py1167 # Check if stopped during LoRA preparation
LOWstudio/backend/core/training/trainer.py2427 # Check if stopped during dataset loading
LOWstudio/backend/core/training/trainer.py2487 # Check if stopped during dataset loading
LOWstudio/backend/core/training/trainer.py2555 # Check if stopped before applying template
LOWstudio/backend/core/training/trainer.py2651 # Check if stopped during formatting
LOWstudio/backend/core/inference/llama_cpp.py1858 # Check if requested context already fits
LOWstudio/backend/core/inference/llama_cpp.py4109 # Check if process crashed
LOWstudio/backend/core/inference/inference.py263 # Check if already loaded
LOWstudio/backend/core/inference/inference.py269 # Check if currently loading
LOWstudio/backend/core/inference/inference.py718 # Check if this adapter name is already part of the model's config. This is the most reliable check.
LOWstudio/backend/core/inference/inference.py1035 # Check if model has a registered template
LOWstudio/backend/core/export/export.py269 # Check if PEFT / LoRA model
LOW…ta_designer_github_repo_seed/scraper_impl/gh_client.py277 # Check if primary rate
LOWstudio/backend/utils/cache_cleanup.py84 # Check if the file matches any of the patterns we want to keep
LOWstudio/backend/utils/datasets/format_conversion.py46 # Check if vision tokenizer is used
LOWstudio/backend/utils/datasets/vlm_processing.py47 # Check if this column has varied content (not just empty/same)
LOWstudio/backend/utils/datasets/format_detection.py637 # Check if has messages column
LOWstudio/backend/utils/datasets/format_detection.py888 # Check if contains text keywords (word-boundary match)
LOWstudio/backend/utils/datasets/chat_templates.py69 # Check if model matches any template in mapper
LOWstudio/backend/utils/datasets/chat_templates.py86 # Check if tokenizer actually has a chat_template set
LOWstudio/backend/utils/datasets/chat_templates.py185 # Check if format_dataset already tried and failed
LOWstudio/backend/utils/models/model_config.py2196 # Check if base model is vision
LOWstudio/backend/utils/models/model_config.py2199 # Check if base model is audio
LOWstudio/backend/utils/models/model_config.py2335 # Check if the HF repo contains GGUF files
LOWstudio/backend/routes/models.py1596 # Check if it's a LoRA adapter
LOWstudio/backend/routes/models.py2604 # Check if model is currently loaded
LOWstudio/backend/routes/inference.py1006 # Check if YAML says this model needs trust_remote_code
LOWstudio/backend/routes/inference.py1197 # Check if the GGUF backend has this model loaded or is loading it
LOWstudio/backend/routes/inference.py1288 # Check if current model supports vision
LOWstudio/backend/routes/training.py433 # Check if training is active
LOWstudio/backend/routes/training.py447 # Check if training was stopped by user
LOWstudio/backend/routes/training.py139 # Check if training is already active (before mutating any state)
LOWtests/python/test_e2e_no_torch_sandbox.py1076 # Check if torch is installed in the studio venv
LOWtests/utils/aime_eval.py30 # Check if combined file already exists
LOWtests/utils/aime_eval.py306 # Check if any answer is correct
LOWunsloth_cli/commands/studio.py1176 # Check if the process is still alive
LOWunsloth_cli/commands/train.py73 # Check if the model path is a LoRA adapter (has adapter_config.json)
LOWscripts/scan_packages.py1939 # Check if any are git deps
LOWunsloth/save.py678 # Check if PEFT Model or not - if yes, 3 levels. If not 2 levels.
LOWunsloth/save.py862 # Check if Kaggle or Colab, since only 20GB of Disk space allowed.
LOWunsloth/save.py1018 # Check if pushing to an organization
LOWunsloth/save.py1066 # Check if pushing to an organization
LOWunsloth/save.py1239 # Check if the llama.cpp exists
LOWunsloth/save.py1279 # Check if successful
LOWunsloth/save.py1333 # Check if the executable exists and is executable
LOWunsloth/save.py1378 # Check if bfloat16 is supported
LOWunsloth/save.py1409 # Check if wrong method
LOWunsloth/save.py1427 # Check if q8_0 is the ONLY quantization method requested
LOWunsloth/save.py1939 # Check if BOS added already, then warn
LOWunsloth/save.py2190 # Check if push_to_hub is requested
LOWunsloth/save.py2997 # Check if wrong method
LOWunsloth/save.py3602 # Check if push_to_hub exists before accessing its __name__
LOWunsloth/tokenizer_utils.py112 # Check if token is the actual same one - if not, edit it
LOWunsloth/tokenizer_utils.py178 # Check if they're similar!
LOWunsloth/tokenizer_utils.py285 # Check if chat template is enabled!
LOWunsloth/tokenizer_utils.py383 # Check if tokenizer.model exists
LOWunsloth/tokenizer_utils.py1394 # Check if sep_token or other generic types
LOWunsloth/import_fixes.py618 # Check if the original function iterates over self.modules() instead of just returning the enable_input_require_gra
52 more matches not shown…
Cross-File Repetition27 hits · 135 pts
SeverityFileLineSnippet
HIGHunsloth-cli.py0below is an instruction that describes a task, paired with an input that provides further context. write a response that
HIGHstudio/backend/utils/datasets/chat_templates.py0below is an instruction that describes a task, paired with an input that provides further context. write a response that
HIGH…language_models/test_merge_model_perplexity_mistral.py0below is an instruction that describes a task, paired with an input that provides further context. write a response that
HIGH…language_models/test_merge_model_perplexity_mistral.py0below is an instruction that describes a task, paired with an input that provides further context. write a response that
HIGH…nguage_models/test_merged_model_perplexity_qwen_2.5.py0below is an instruction that describes a task, paired with an input that provides further context. write a response that
HIGH…nguage_models/test_merged_model_perplexity_qwen_2.5.py0below is an instruction that describes a task, paired with an input that provides further context. write a response that
HIGHstudio/backend/core/training/worker.py0activate the correct transformers version before any ml imports.
HIGHstudio/backend/core/inference/worker.py0activate the correct transformers version before any ml imports.
HIGHstudio/backend/core/export/worker.py0activate the correct transformers version before any ml imports.
HIGHstudio/backend/auth/storage.py0insert into auth_user ( username, password_salt, password_hash, jwt_secret, must_change_password ) values (?, ?, ?, ?, ?
HIGHstudio/backend/tests/test_desktop_auth.py0insert into auth_user ( username, password_salt, password_hash, jwt_secret, must_change_password ) values (?, ?, ?, ?, ?
HIGHunsloth_cli/commands/studio.py0insert into auth_user ( username, password_salt, password_hash, jwt_secret, must_change_password ) values (?, ?, ?, ?, ?
HIGHtests/studio/playwright_extra_ui.py0(want) => { return document.queryselectorall( '[data-role="assistant"]' ).length >= want; }
HIGHtests/studio/playwright_extra_ui.py0(want) => { return document.queryselectorall( '[data-role="assistant"]' ).length >= want; }
HIGHtests/studio/playwright_chat_ui.py0(want) => { return document.queryselectorall( '[data-role="assistant"]' ).length >= want; }
HIGHunsloth/save.py0same as .push_to_hub(...) except 4bit weights are auto converted to float16 with as few overhead as possible. choose for
HIGHunsloth/save.py0same as .push_to_hub(...) except 4bit weights are auto converted to float16 with as few overhead as possible. choose for
HIGHunsloth/save.py0same as .push_to_hub(...) except 4bit weights are auto converted to float16 with as few overhead as possible. choose for
HIGHunsloth/ollama_template_mappers.py0parameter stop "{__eos_token__}" parameter temperature 1.5 parameter min_p 0.1 system
HIGHunsloth/ollama_template_mappers.py0parameter stop "{__eos_token__}" parameter temperature 1.5 parameter min_p 0.1 system
HIGHunsloth/ollama_template_mappers.py0parameter stop "{__eos_token__}" parameter temperature 1.5 parameter min_p 0.1 system
HIGHunsloth/ollama_template_mappers.py0parameter stop "{__eos_token__}" parameter temperature 1.5 parameter min_p 0.1
HIGHunsloth/ollama_template_mappers.py0parameter stop "{__eos_token__}" parameter temperature 1.5 parameter min_p 0.1
HIGHunsloth/ollama_template_mappers.py0parameter stop "{__eos_token__}" parameter temperature 1.5 parameter min_p 0.1
HIGHunsloth/models/llama.py0https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/modeling_llama.py#l406 fast inferenc
HIGHunsloth/models/qwen3.py0https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/modeling_llama.py#l406 fast inferenc
HIGHunsloth/models/falcon_h1.py0https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/modeling_llama.py#l406 fast inferenc
AI Slop Vocabulary39 hits · 102 pts
SeverityFileLineSnippet
MEDIUMstudio/frontend/package-lock.json13675 "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz",
MEDIUMstudio/backend/core/inference/external_provider.py2772 # dispatch robust if that ever changes.
MEDIUMstudio/backend/core/inference/inference.py690 # 3. Call our robust load_adapter function to ensure this specific adapter is loaded.
MEDIUMstudio/backend/tests/test_anthropic_citations_edge.py23# ── shared SSE harness ───────────────────────────────────────
MEDIUMtests/conftest.py148# and apply at unsloth import time. The GPU-free harness above pre-spoofs
MEDIUMtests/_zoo_aggressive_cuda_spoof.py3# tests/conftest.py:84-141's import-time harness with deeper patches that
MEDIUMtests/studio/test_cli_studio_defaults.py34 # iterate calls directly, which is simpler and robust.
MEDIUMtests/studio/run_real_mlx_smoke.py328 # configurations, so 30 is the seed-robust gate.
MEDIUMtests/studio/run_real_mlx_smoke.py415 # the robust signal that the model learned the trained
MEDIUMtests/studio/run_real_mlx_smoke.py589 # and is robust to MLX's known near-zero-loss adamw greedy-decode
MEDIUMtests/studio/_playwright_robust.py545# the comprehensive chat UI test. 12 minutes (720 s) leaves headroom
MEDIUMtests/studio/playwright_chat_ui.py90# Wall-clock cap for the entire script. A healthy comprehensive run is
LOWtests/studio/playwright_chat_ui.py570 # we just call the same endpoint the picker would.
MEDIUMtests/studio/install/test_rocm_support.py2068 """Verify that setup.ps1 and install.ps1 have robust gfx arch detection
MEDIUMtests/utils/aime_eval.py419 # Print comprehensive summary
MEDIUMtests/utils/aime_eval.py474 """Generate comprehensive comparison for AIME evaluation results"""
LOWtests/vllm_compat/test_extended_module_imports.py289# named test in compiler.py:1983; we just call it.
MEDIUM…/saving/language_models/test_save_merged_grpo_model.py376 """Generate comprehensive comparison of multiple model results"""
MEDIUM.github/workflows/studio-inference-smoke.yml281 # assertion robust to formatting jitter.
MEDIUM.github/workflows/consolidated-tests-ci.yml389 # tests/conftest.py's GPU-spoof harness applies before the import.
MEDIUM.github/workflows/consolidated-tests-ci.yml390 # _zoo_aggressive_cuda_spoof extends conftest's harness with deeper
MEDIUM.github/workflows/consolidated-tests-ci.yml185 # so we inherit the same CPU-spoof harness in tests/conftest.py and
MEDIUM.github/workflows/consolidated-tests-ci.yml378 # picks up tests/conftest.py, whose GPU-spoof harness (lines 84-141)
MEDIUM.github/workflows/consolidated-tests-ci.yml485 # Routed through pytest so tests/conftest.py's GPU-spoof harness
MEDIUM.github/workflows/consolidated-tests-ci.yml497 # tests/conftest.py GPU-spoof harness applies. continue-on-error
MEDIUM.github/workflows/consolidated-tests-ci.yml613 # unsloth_zoo.tiled_mlp, so the GPU-spoof harness covers
MEDIUM.github/workflows/consolidated-tests-ci.yml919 # module globals after import so this shim is robust to that
MEDIUM.github/workflows/consolidated-tests-ci.yml1709 # harness so unsloth_zoo.temporary_patches imports are clean.
MEDIUM.github/workflows/consolidated-tests-ci.yml2099 # without an accelerator and the spoof harness only kicks in under
MEDIUM.github/workflows/studio-mac-inference-smoke.yml280 # assertion robust to formatting jitter.
MEDIUM.github/workflows/studio-backend-ci.yml121 # compile a tiny TS harness against the frontend chat sources.
MEDIUM.github/workflows/notebooks-ci.yml17# tests/_zoo_aggressive_cuda_spoof.py harness so `import unsloth`
MEDIUMunsloth/tokenizer_utils.py583 # Let's utilize them
LOWunsloth/tokenizer_utils.py598 # Cannot just use use_fast = False as per https://twitter.com/danielhanchen/status/1789659394302718373
LOWunsloth/tokenizer_utils.py1457 # Cannot just use use_fast = False as per https://twitter.com/danielhanchen/status/17896593943027183
LOWunsloth/import_fixes.py503 # trl.import_utils to bool; the existing accessors that just return
MEDIUMunsloth/kernels/rms_layernorm.py139 # exactly. Essentially all in float32!
LOWunsloth/models/loader_utils.py132 # so just return the original model name. Older vllm versions will
MEDIUMunsloth/models/rl_replacements.py1436 # Essentially, for VLMs we do not go via the optimized path in models/,
Self-Referential Comments23 hits · 76 pts
SeverityFileLineSnippet
MEDIUMstudio/backend/core/export/export.py641 # Create the directory if it doesn't exist
MEDIUMstudio/backend/tests/test_gemini_provider.py47 # Create a fresh loop per drive so tests don't share asyncio state.
MEDIUM…io/backend/tests/test_llama_cpp_windows_nvidia_path.py179 # Create a regular file at the path where 'bin' would normally be a dir
MEDIUM…dio/backend/tests/test_llama_cpp_load_progress_live.py111 # Create a fake 200 MB sparse gguf so bytes_total is concrete.
MEDIUMstudio/backend/tests/test_training_worker_flash_attn.py873 # Create a fake modeling module that did `from ... import is_flash_linear_attention_available`.
MEDIUMtests/python/test_tokenizers_and_torch_constraint.py277 # Create a mock uv that logs its arguments
MEDIUMtests/utils/cleanup_utils.py120 # Create a static list of modules to avoid RuntimeError
MEDIUMtests/utils/perplexity_eval.py48# Create a simple function to add results to the comparison
MEDIUMtests/utils/perplexity_eval.py55# Create a function to print the comparison report whenever needed
MEDIUMtests/utils/perplexity_eval.py64 # Create a comparison dataframe
MEDIUMtests/utils/ocr_eval.py295 # Create a comparison dataframe
MEDIUMtests/utils/aime_eval.py224 # Initialize tracking variables
MEDIUMtests/utils/test_q_galore.py220 # Create a mini-transformer-like model
MEDIUMtests/utils/test_q_galore.py350 # Create a gradient with clear low-rank structure
MEDIUMtests/utils/test_q_galore.py445 # Create a mock parameter and group
MEDIUMtests/sh/test_mac_intel_compat.sh177# Create a mock uname that returns Darwin
MEDIUMtests/sh/test_mac_intel_compat.sh292# Create a mock uv that logs all calls instead of running them
MEDIUM…/saving/language_models/test_save_merged_grpo_model.py144 # Create the assistant response
MEDIUMtests/saving/vision_models/test_push_to_hub_merged.py1## Import required libraries
MEDIUM…/saving/vision_models/test_index_file_sharded_model.py1## Import required libraries
MEDIUMunsloth/save.py2769 # Create the custom directory if it doesn't exist
MEDIUMunsloth/models/loader.py554 # Create a combined error message showing both failures
MEDIUMunsloth/models/loader.py1342 # Create a combined error message showing both failures
Verbosity Indicators33 hits · 36 pts
SeverityFileLineSnippet
LOWinstall.sh440 # Step 1: Try installing without sudo (works when already root)
LOWinstall.sh444 # Step 2: Check which packages are still missing
LOWinstall.sh463 # Step 3: Escalate -- need elevated permissions for remaining packages
LOWstudio/backend/core/tool_healing.py101 # Step 1: Find all <function=name> positions and extract their bodies.
LOWstudio/backend/core/tool_healing.py126 # Step 2: Extract parameters from body.
LOWstudio/backend/core/training/worker.py822 # Step 1: --no-deps keeps --force-reinstall from touching torch/CUDA via the dep graph.
LOWstudio/backend/core/training/worker.py844 # Step 2: regular install pulls in transitive deps (z3-solver, ml-dtypes) without touching torch.
LOWstudio/backend/core/inference/inference.py620 # Step 1: Unload the adapter weights if model is a PeftModel.
LOWstudio/backend/core/inference/inference.py627 # Step 2: Clear any lingering peft_config from the unwrapped model.
LOWstudio/backend/core/inference/inference.py1026 # Step 1: Apply get_chat_template if model is in mapper
LOWstudio/backend/core/inference/inference.py1054 # Step 2: Format with tokenizer.apply_chat_template()
LOWstudio/backend/core/inference/inference.py1084 # Step 3: Generate
LOWstudio/backend/utils/datasets/dataset_utils.py1106 # Step 1: Format the dataset
LOWstudio/backend/utils/datasets/dataset_utils.py1138 # Step 2: Apply chat template
LOWstudio/backend/utils/datasets/dataset_utils.py1165 # Step 3: Generate summary
LOWunsloth/save.py1468 # Step 1: Ensure llama.cpp is installed
LOWunsloth/save.py1485 # Step 2: Download and patch converter script
LOWunsloth/save.py1492 # Step 3: Initial GGUF conversion
LOWunsloth/save.py1541 # Step 4: Additional quantizations using llama-quantize
LOWunsloth/save.py2307 # Step 6: Clean up memory
LOWunsloth/save.py2315 # Step 7: Get model dtype and type
LOWunsloth/save.py2196 # Step 1: Check if this is a VLM (Vision-Language Model) and check if gpt-oss
LOWunsloth/save.py2219 # Step 2: Prepare arguments for model saving
LOWunsloth/save.py2252 # Step 3: Fix tokenizer BOS token if needed
LOWunsloth/save.py2258 # Step 4: Save/merge model to 16-bit format
LOWunsloth/save.py2332 # Step 8: Convert to GGUF format
LOWunsloth/save.py2396 # Step 9: Create Ollama modelfile
LOWunsloth/save.py2418 # Step 10: Show BOS token warning if applicable
LOWunsloth/save.py2510 # Step 1: Determine save directory
LOWunsloth/save.py2523 # Step 2: Call save_pretrained_gguf to do the conversion
LOWunsloth/save.py2561 # Step 3: Upload to HuggingFace Hub
LOWunsloth/kernels/moe/tests/moe_utils.py45 # Step 2: Copy existing expert weights into buffers
LOWunsloth/kernels/moe/tests/moe_utils.py51 # Step 3: Rebind expert weights to views in shared buffer
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippet
CRITICALunsloth/save.py885 internal_model.model.embed_tokens.weight.data.to(torch_dtype)
CRITICALunsloth/kernels/moe/grouped_gemm/kernels/tuning.py42 properties = triton.runtime.driver.active.utils.get_device_properties(
Dead Code5 hits · 10 pts
SeverityFileLineSnippet
MEDIUMunsloth/kernels/fast_lora.py656
MEDIUMunsloth/kernels/fast_lora.py657
MEDIUMunsloth/kernels/fast_lora.py659
MEDIUMunsloth/kernels/fast_lora.py730
MEDIUMunsloth/kernels/moe/autotune_cache.py386
Example Usage Blocks3 hits · 6 pts
SeverityFileLineSnippet
LOWtests/saving/text_to_speech_models/test_whisper.py166# Example usage
LOWscripts/install_gemma4_mlx.sh13# Usage:
LOWscripts/install_qwen3_6_mlx.sh16# Usage:
Cross-Language Confusion (JS/TS)1 hit · 5 pts
SeverityFileLineSnippet
HIGH…nd/src/features/settings/components/usage-examples.tsx68 print(chunk.choices[0].delta.content or "", end="")`,
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippet
HIGHstudio/backend/utils/inference/inference_config.py127 Load inference configuration parameters for a model. Priority chain: 1. Model-specific YAML (if it exists
Slop Phrases4 hits · 4 pts
SeverityFileLineSnippet
MEDIUMunsloth-cli.py17Usage: (most of the options have valid default values this is an extended example for demonstration purposes)
LOWunsloth/kernels/cross_entropy_loss.py373 losses.masked_fill_(labels == -100, 0) # Don't forget to mask padding out!
LOWunsloth/kernels/fast_lora.py64 Don't forget to see our blog post for more details!
LOWunsloth/models/qwen3_moe.py83 # the current expert. We need to make sure to multiply the output hidden