MCPcopy Create free account

hub / github.com/unslothai/unsloth / functions

Functions18,583 in github.com/unslothai/unsloth

↓ 17 callersFunction_classify
Mirror _check_token_patterns: first match in dict order wins.
studio/backend/tests/test_audio_token_detection.py:12
↓ 17 callersMethod_classify_gpu_offload
True if the model landed on a GPU, False if only CPU buffers landed despite GPU intent, None when there's no signal. Delegates to the shared
studio/backend/core/inference/llama_cpp.py:6798
↓ 17 callersFunction_disable
(monkeypatch)
studio/backend/tests/test_mcp_stdio_pr5863.py:34
↓ 17 callersFunction_fake_binary
Stub llama-server under a supported install layout.
studio/backend/tests/test_llama_cpp_freshness.py:77
↓ 17 callersFunction_marker
(source_id: str, locator: str | None = None)
studio/backend/tests/test_openai_citation_markers.py:28
↓ 17 callersFunction_require_rag
()
studio/backend/routes/rag.py:36
↓ 17 callersFunction_resolve_base_model
If *model_name* points to a LoRA adapter, return its base model. Checks ``adapter_config.json`` locally first. Only calls the heavier ``get_b
studio/backend/utils/transformers_version.py:345
↓ 17 callersFunction_responses_stream
Handle a streaming Responses API call, emitting named SSE events. For GGUF models the request goes directly to llama-server's ``/v1/chat/comp
studio/backend/routes/inference.py:8200
↓ 17 callersFunction_run_in_sandbox
Run Python code in a sandboxed interpreter.
tests/python/test_e2e_no_torch_sandbox.py:67
↓ 17 callersFunction_send_response
Send a response to the parent process.
studio/backend/core/export/worker.py:226
↓ 17 callersFunction_sig
Valid capability token for ``ref`` under the patched test secret.
studio/backend/tests/test_preview_routes.py:51
↓ 17 callersFunction_url
(path: str)
studio/backend/tests/test_providers_api.py:70
↓ 17 callersFunctionanthropic_messages_to_openai
Convert Anthropic messages + system to OpenAI-format message dicts. User messages with ``image`` blocks are emitted as OpenAI multimodal cont
studio/backend/core/inference/anthropic_compat.py:72
↓ 17 callersFunctiondetect_mmproj_file
Find the mmproj GGUF for a model. ``path``: directory or a .gguf file. ``search_root``: optional ancestor to also walk (snapshot layouts wher
studio/backend/utils/models/model_config.py:1212
↓ 17 callersFunctionestimate_required_model_memory_gb
( model_name: str, *, hf_token: Optional[str] = None, training_type: Optional[str] = None,
studio/backend/utils/hardware/hardware.py:1480
↓ 17 callersFunctionexisting_install_matches_plan
( install_dir: Path, host: HostInfo, plan: InstallReleasePlan )
studio/install_llama_prebuilt.py:6479
↓ 17 callersMethodremove
()
studio/frontend/src/features/chat/runtime-provider.tsx:155
↓ 17 callersMethodreset_generation_state
Reset any cached generation state to prevent hanging after errors
studio/backend/core/inference/inference.py:1918
↓ 17 callersFunctionrun_bash
Run a bash fragment. 60s default tolerates slow CI shell startup.
tests/studio/install/test_llama_pr_force_and_source.py:21
↓ 17 callersFunctionsetBackendError
( nextError: string, nextStatus: BackendStatus = "error", )
studio/frontend/src/hooks/use-tauri-backend.ts:127
↓ 17 callersMethodterminate
(self)
studio/backend/tests/test_tensor_parallel.py:130
↓ 17 callersMethodunload_model
Terminate the subprocess and cancel any in-flight download.
studio/backend/core/inference/llama_cpp.py:6815
↓ 16 callersFunction_assert_env_set
(output: str, name: str, value: str)
unsloth_cli/tests/test_connect.py:31
↓ 16 callersMethod_backend
(self, stdout_lines)
studio/backend/tests/test_llama_cpp_context_fit.py:524
↓ 16 callersMethod_can_estimate_kv
True if we have enough GGUF metadata to estimate KV cache size.
studio/backend/core/inference/llama_cpp.py:2705
↓ 16 callersFunction_capture
Drive ``stream_chat_completion`` against a mocked Anthropic response and return the SSE lines. Pass ``captured_body`` to also capture the outg
studio/backend/tests/test_anthropic_citations_edge.py:46
↓ 16 callersFunction_content_block_stop
(index: int = 0)
studio/backend/tests/test_anthropic_citations_edge.py:132
↓ 16 callersFunction_convo
(text = "summarize the whole document")
studio/backend/tests/test_rag_whole_document.py:207
↓ 16 callersFunction_detect_safetensors_features
Classify reasoning/tool capabilities via the GGUF classifier so flags match across backends. gpt-oss is overridden: Harmony routes reasoning and
studio/backend/routes/inference.py:1266
↓ 16 callersFunction_drive
(coro)
studio/backend/tests/test_anthropic_messages.py:1446
↓ 16 callersFunction_load_run_command
Import `studio` without triggering server start; backend imports are lazy inside run().
unsloth_cli/tests/test_studio_run_parallel_flag.py:28
↓ 16 callersFunction_log
(msg: str)
tests/studio/install/smoke_test_parallel_studio_home.py:41
↓ 16 callersFunction_mk_dir
(parent: Path, name: str)
studio/backend/tests/test_cleanup_cancelled_checkpoints.py:30
↓ 16 callersFunction_rocm_classify_unified_memory
Classify a ROCm device as unified-memory (APU) or discrete. Returns ``(gcn_arch, is_unified)``: - ``gcn_arch``: canonical arch string (e.g. `
studio/backend/core/training/worker.py:687
↓ 16 callersFunction_step
Print a single step line in the column format.
studio/install_python_stack.py:1602
↓ 16 callersMethod_upstream
( self, *runtime_versions, current_names: bool = False, )
tests/studio/install/test_selection_logic.py:2089
↓ 16 callersMethod_visit_expr
(self, node: ast.AST, scope: Scope)
scripts/verify_import_hoist.py:339
↓ 16 callersFunctionapiUrl
(path: string)
studio/frontend/src/lib/api-base.ts:35
↓ 16 callersFunctionextract_quant_label
(filename: str)
studio/backend/hub/utils/gguf.py:233
↓ 16 callersFunctionfirst_match
Return (path, src) for the first existing candidate path, else None.
tests/version_compat/_fetch.py:52
↓ 16 callersMethodflush
(self)
studio/backend/run.py:905
↓ 16 callersFunctionget_chat_template
( tokenizer, chat_template = "chatml", mapping = {"role" : "role", "content" : "content", "user" :
unsloth/chat_templates.py:1841
↓ 16 callersFunctionloadBool
(key: string, fallback: boolean)
studio/frontend/src/features/chat/stores/chat-runtime-store.ts:303
↓ 16 callersFunctionnotifyChatHistoryUpdated
()
studio/frontend/src/features/chat/api/chat-api.ts:32
↓ 16 callersFunctionnow
()
studio/frontend/src/features/chat/prompt-storage/prompt-storage-dialog.tsx:64
↓ 16 callersFunctionpatch_saving_functions
(model, vision = False)
unsloth/save.py:4455
↓ 16 callersFunctionreadNumberString
(value: unknown)
studio/frontend/src/features/recipe-studio/utils/import/helpers.ts:14
↓ 16 callersFunctionrun_bash
Run a bash fragment, return stdout.
tests/studio/install/test_pr4562_bugfixes.py:56
↓ 16 callersFunctionrun_test
(fn, *a, **kw)
studio/backend/tests/test_studio_api.py:856
↓ 16 callersFunctionsafe_error_detail
Map an exception to a generic, client-safe message (never raw ``str(error)``, which can leak paths). Log the real exception server-side.
studio/backend/utils/utils.py:22
↓ 16 callersFunctionsaveBool
(key: string, value: boolean)
studio/frontend/src/features/chat/stores/chat-runtime-store.ts:336
↓ 16 callersFunctionsoft_fail
Hard fail in STRICT mode, info-warn otherwise.
tests/studio/playwright_chat_ui.py:112
↓ 16 callersFunctiontoNumber
(value: unknown)
studio/frontend/src/features/training/lib/model-defaults.ts:46
↓ 16 callersFunctionuseDebouncedValue
(value: T, delayMs = 300)
studio/frontend/src/hooks/use-debounced-value.ts:6
↓ 16 callersMethodwrite
Return True if newly written, False if already present.
studio/backend/plugins/data-designer-github-repo-seed/src/data_designer_github_repo_seed/scraper_impl/state_store.py:92
↓ 15 callersFunction_basic_payload
(**fields)
studio/backend/tests/test_anthropic_messages.py:1450
↓ 15 callersFunction_content_block_start_text
()
studio/backend/tests/test_anthropic_citations_edge.py:108
↓ 15 callersFunction_extra_args_requests_mtp
True if the effective --spec-type selects MTP (mtp/draft-mtp), so the budget must reserve for it.
studio/backend/core/inference/llama_cpp.py:947
↓ 15 callersFunction_fake_llama_backend
( *, active = False, identifier = "model.gguf", gpu_offload = None, loaded = None, )
studio/backend/tests/test_training_vram_coexistence.py:56
↓ 15 callersMethod_install_stream_mock
( monkeypatch, chunks, *, supports_reasoning = True, reasoning_always_
studio/backend/tests/test_responses_tool_passthrough.py:1034
↓ 15 callersFunction_message_delta_end
()
studio/backend/tests/test_anthropic_citations_edge.py:136
↓ 15 callersFunction_message_start
()
studio/backend/tests/test_anthropic_citations_edge.py:94
↓ 15 callersFunction_message_stop
()
studio/backend/tests/test_anthropic_citations_edge.py:140
↓ 15 callersFunction_meta
( files: list[dict], requires = None, version: str = "1.0.0", )
tests/security/test_scan_packages.py:1339
↓ 15 callersFunction_mock_backend
Install a minimal stub backend on routes.inference. Generation methods record which path the route entered, then yield one content event so t
studio/backend/tests/test_anthropic_messages.py:1412
↓ 15 callersFunction_no_private_use
(text: str)
studio/backend/tests/test_openai_citation_markers_edge.py:37
↓ 15 callersFunction_patch_backends
Stub core.inference + routes.inference modules so the lazy imports inside training_vram resolve to fakes (avoids importing torch-heavy backends).
studio/backend/tests/test_training_vram_coexistence.py:75
↓ 15 callersFunction_props
Build a fake device-properties object with the given attributes.
studio/backend/tests/test_rocm_oom_guard.py:27
↓ 15 callersFunction_render
(template_name, messages, **kwargs)
tests/test_gemma4_chat_template.py:30
↓ 15 callersFunction_unsloth_install_pretrain_detector
Attach a one-shot forward pre-hook recording whether a forward ran before trainer.train(), so prepare_for_training_mode can drop a torch.compile g
unsloth/models/_utils.py:280
↓ 15 callersMethod_visit_body
(self, stmts, scope: Scope)
scripts/verify_import_hoist.py:158
↓ 15 callersFunctionanthropic_messages
Anthropic-compatible Messages API endpoint. Translates Anthropic message format to internal OpenAI format, runs through the existing age
studio/backend/routes/inference.py:9202
↓ 15 callersFunctionapply_approved_hashes
( attempts: Iterable[AssetChoice], checksums: ApprovedReleaseChecksums )
studio/install_llama_prebuilt.py:5945
↓ 15 callersMethodclean_text
Remove unwanted characters, normalize whitespace
unsloth/dataprep/raw_text.py:257
↓ 15 callersFunctioncompute_total_params
(arch: ModelArchConfig)
studio/backend/utils/hardware/vram_estimation.py:860
↓ 15 callersMethodconvert
(self, *args, **kwargs)
unsloth/import_fixes.py:1703
↓ 15 callersFunctiondetect_gguf_model
Check if a local path is or contains a GGUF model file. Handles a direct .gguf path or a directory of .gguf files. Skips mmproj files (pass t
studio/backend/utils/models/model_config.py:1370
↓ 15 callersFunctionfail
(m)
tests/studio/playwright_chat_ime_i18n.py:88
↓ 15 callersMethodfail
(self)
studio/backend/tests/test_offline_gguf_cache_fallback.py:506
↓ 15 callersFunctionformatGb
(value: number | null | undefined)
studio/frontend/src/features/settings/tabs/resources-tab.tsx:44
↓ 15 callersFunctiongetDefaultDataSourceHandle
(direction: LayoutDirection)
studio/frontend/src/features/recipe-studio/utils/handles.ts:194
↓ 15 callersFunctiongetDefaultDataTargetHandle
(direction: LayoutDirection)
studio/frontend/src/features/recipe-studio/utils/handles.ts:190
↓ 15 callersFunctiongetOpenDocumentAttribute
( element: Element, namespaceUri: string, name: string, )
studio/frontend/src/features/chat/open-document.ts:713
↓ 15 callersFunctionget_base_model_from_lora_identifier
Resolve a LoRA adapter's base model for a LOCAL dir OR a REMOTE HF repo. ``get_base_model_from_lora`` only reads a local adapter directory (it re
studio/backend/utils/models/model_config.py:2319
↓ 15 callersMethodgraphql
( self, query: str, variables: Optional[Dict[str, Any]] = None, max_retries: i
studio/backend/plugins/data-designer-github-repo-seed/src/data_designer_github_repo_seed/scraper_impl/gh_client.py:153
↓ 15 callersFunctiongrouped_gemm
Grouped GEMM for MoE MLPs. The implementation offers a number of fusions specific to MoE: - `permute_x`: fuse the permutation of hidden
unsloth/kernels/moe/grouped_gemm/interface.py:878
↓ 15 callersMethodis_disconnected
(self)
studio/backend/tests/test_llama_route_timeouts.py:110
↓ 15 callersFunctionjobKeyOf
( kind: DownloadKind, repoId: string, variant: string | null, )
studio/frontend/src/features/hub/download-manager/download-manager-state.ts:130
↓ 15 callersFunctionparseNumber
(value?: string)
studio/frontend/src/features/recipe-studio/utils/parse.ts:4
↓ 15 callersMethodpost
(self, *args, **kwargs)
studio/backend/hub/tests/conftest.py:56
↓ 15 callersMethodremove
(self)
unsloth/models/_utils.py:1257
↓ 15 callersFunctionresolve_model_class
(auto_model, config)
unsloth/models/_utils.py:658
↓ 15 callersMethodresponse_payload
Machine-readable detail for the frontend. ``error_kind`` splits a user-approvable prompt (``remote_code_consent_required``) from a CRITICAL ha
studio/backend/utils/security/consent.py:57
↓ 15 callersFunctionseed_user
()
studio/backend/tests/test_api_key_expiry.py:32
↓ 15 callersMethodstart
Emit message_start and open the first text content block.
studio/backend/core/inference/anthropic_compat.py:263
↓ 15 callersMethodstart
( self, message_id: str, model: str, input_tokens: int = 0, )
studio/backend/core/inference/anthropic_compat.py:498
↓ 15 callersFunctiontokenizer
(loaded_model_tokenizer)
tests/saving/test_unsloth_save.py:98
↓ 14 callersFunction_add
(p: Optional[Path])
studio/backend/routes/models.py:1050
↓ 14 callersMethod_auth_headers
Build authentication headers using the provider's registry config.
studio/backend/core/inference/external_provider.py:778
↓ 14 callersFunction_backend
Backend with just the dims the compute-buffer estimate reads.
studio/backend/tests/test_compute_buffer.py:64
← previousnext →301–400 of 18,583, ranked by callers