Public scan — anyone with this URL can view this analysis. Sign up to track your own repos privately, run scheduled re-scans, and get AI fix prompts via your dashboard.
132 of your 234 findings came from Repobility's proprietary detections. ✓ Repobility tags below mark them.

Scan timing: clone 9.94s · analysis 11.53s · 13.1 MB · GitHub API rate-limit (preflight)

hiyouga/LlamaFactory

https://github.com/hiyouga/LlamaFactory · scanned 2026-06-05 08:17 UTC (5 days, 19 hours ago) · 10 languages

446 raw signals (216 security + 230 graph) 53rd percentile · Python · medium (20-100K LoC) System graph score 82 (lower by 16)

UNIFIED Repobility · multi-layer engine · AI coders

Complete repo analysis

Last scanned 5 days, 19 hours ago · v2 · 168 actionable findings from 2 signal sources. 163 repeated signals grouped for readability. Security checks, system graph analysis, and verified AI-agent feedback are merged into one review queue.

JSON
Score breakdown â 2026-05-18-v5
Component Sub-score Weight Contribution
structure_score 85.0 0.15 12.75
security_score 34.4 0.25 8.60
testing_score 94.0 0.20 18.80
documentation_score 73.0 0.15 10.95
practices_score 72.0 0.15 10.80
code_quality 41.6 0.10 4.16
Overall 1.00 66.1
Severity distribution — click a segment to filter
Active filters: excluding tests × Reset all
Scan summary Quality grade B- (66/100). Dimensions: security 34, maintainability 85. 216 findings (36 security). 51,672 lines analyzed.

Showing 105 of 168 actionable findings. 331 raw detector signals were grouped into reader-sized issues. Click TP / FP to vote on a finding's accuracy — votes adjust the confidence weighting and improve detection across the platform.

critical Security checks security secrets conf 0.95 2 occurrences Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
Gitleaks detected a committed secret or credential pattern.
lines 5293, 7236
data/glaive_toolcall_en_demo.json:5293, 7236 (2 hits)
low Security checks cicd CI/CD security conf 0.35 ✓ Repobility 5 occurrences Workflow references repository secrets in a pull_request workflow
Fork pull_request runs do not receive normal repository secrets on GitHub Actions. Review this as a reliability/intent signal, not as direct fork-secret exfiltration. Raise severity only for pull_request_target or another trusted-context path that runs untrusted PR code with secrets.
4 files, 5 locations
.github/workflows/docker.yml:72, 80 (2 hits)
.github/workflows/tests.yml:52
.github/workflows/tests_cuda.yml:41
.github/workflows/tests_npu.yml:44
CI/CD securityworkflow secretsGitHub Actions
high Security checks quality Quality conf 1.00 ✓ Repobility [MINED021] Path Traversal Os Join: os.path.join(user_dir, filename) where filename can contain "../" — directory escape.
Review and fix per the pattern semantics. See CWE-22 / A01:2021 for context.
scripts/convert_ckpt/llamafy_qwen.py:42
high Security checks quality Quality conf 1.00 ✓ Repobility [MINED021] Path Traversal Os Join: os.path.join(user_dir, filename) where filename can contain "../" — directory escape.
Review and fix per the pattern semantics. See CWE-22 / A01:2021 for context.
scripts/convert_ckpt/llamafy_baichuan2.py:34
high Security checks security path traversal conf 0.80 [SEC013] Path Traversal — User Input in File Path: User-controlled input used in file path without sanitization. Allows reading arbitrary files.
Use os.path.realpath() and verify the path starts with your expected base directory. Use secure_filename() for uploads.
scripts/convert_ckpt/llamafy_qwen.py:42
high Security checks security path traversal conf 0.80 [SEC013] Path Traversal — User Input in File Path: User-controlled input used in file path without sanitization. Allows reading arbitrary files.
Use os.path.realpath() and verify the path starts with your expected base directory. Use secure_filename() for uploads.
scripts/convert_ckpt/llamafy_baichuan2.py:34
high Security checks quality Quality conf 1.00 ✓ Repobility 25 occurrences `self.model` used but never assigned in __init__
Method `__post_init__` of class `MultiModalDataCollatorForSeq2Seq` reads `self.model`, but no assignment to it exists in __init__ (and no class-level fallback). This raises AttributeError the first time the method runs against an instance.
3 files, 25 locations
src/llamafactory/hparams/finetuning_args.py:566, 567, 568, 569, 570, 571, 572, 573, +5 more (13 hits)
scripts/bench_qwen.py:81, 82, 84, 85, 86, 87, 89, 104, +1 more (11 hits)
src/llamafactory/hparams/training_args.py:61
high Security checks quality Quality conf 1.00 ✓ Repobility Blocking call `requests.post` inside async function `_generate`
`requests.post` is a synchronous (blocking) call. When invoked inside an `async def` it stalls the event loop, preventing every other coroutine in the process from making progress.
src/llamafactory/chat/sglang_engine.py:217
high Security checks cicd CI/CD security conf 0.90 2 occurrences Compose service bind-mounts a sensitive host path
Mounting broad host paths exposes host files to the container and can turn app compromise into host compromise.
lines 1, 29
docker/docker-npu/docker-compose.yml:1, 29 (2 hits)
CI/CD securitycontainers
high Security checks cicd CI/CD security conf 0.90 4 occurrences Compose service joins the host IPC namespace
Sharing host namespaces reduces isolation and can expose host processes, networking, or IPC resources.
3 files, 4 locations
docker/docker-npu/docker-compose.yml:1, 29 (2 hits)
docker/docker-cuda/docker-compose.yml:1
docker/docker-rocm/docker-compose.yml:1
CI/CD securitycontainers
high Security checks software dependencies conf 0.90 ✓ Repobility Dockerfile FROM `nvcr.io/nvidia/pytorch:25.06-py3` not pinned by digest
`FROM nvcr.io/nvidia/pytorch:25.06-py3` resolves the tag at build time. The registry CAN re-push a different image for the same tag, so every build is potentially different. Production images should pin to `image@sha256:...` for reproducibility + supply-chain integrity.
docker/docker-cuda/Dockerfile.megatron:3
high Security checks software dependencies conf 0.90 ✓ Repobility Dockerfile FROM `pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel` not pinned by digest
`FROM pytorch/pytorch:2.6.0-cuda12.4-cudnn9-devel` resolves the tag at build time. The registry CAN re-push a different image for the same tag, so every build is potentially different. Production images should pin to `image@sha256:...` for reproducibility + supply-chain integrity.
docker/docker-cuda/Dockerfile.base:3
high Security checks quality Quality conf 0.80 ✓ Repobility FastAPI POST /v1/chat/completions has no auth
Handler `create_chat_completion` is registered with router/app.post(...) but no Depends/Security parameter is declared and no auth marker appears in the function body.
src/llamafactory/api/app.py:102
high Security checks quality Quality conf 0.80 ✓ Repobility FastAPI POST /v1/score/evaluation has no auth
Handler `create_score_evaluation` is registered with router/app.post(...) but no Depends/Security parameter is declared and no auth marker appears in the function body.
src/llamafactory/api/app.py:118
medium Security checks cicd CI/CD security conf 0.90 ✓ Repobility 18 occurrences GitHub Action is tag-pinned rather than SHA-pinned
Action `jlumbroso/free-disk-space` pinned to mutable ref `@v1.3.1` uses a mutable tag or branch. Pin external actions to a reviewed full commit SHA when the workflow is security-sensitive.
5 files, 18 locations
.github/workflows/docker.yml:47, 65, 69, 76, 84, 94, 106 (8 hits)
.github/workflows/publish.yml:27, 37 (4 hits)
.github/workflows/tests.yml:61 (2 hits)
.github/workflows/tests_cuda.yml:50 (2 hits)
.github/workflows/tests_npu.yml:59 (2 hits)
CI/CD securitySupply chainGitHub Actions
low Security checks cicd CI/CD security conf 0.90 ✓ Repobility 21 occurrences GitHub Action is tag-pinned rather than SHA-pinned
Action `actions/checkout` pinned to mutable ref `@v6` uses a mutable tag or branch. Pin external actions to a reviewed full commit SHA when the workflow is security-sensitive.
6 files, 21 locations
.github/workflows/docs.yml:27, 30, 61, 64, 77 (9 hits)
.github/workflows/tests.yml:58, 81 (4 hits)
.github/workflows/docker.yml:53 (2 hits)
.github/workflows/publish.yml:24 (2 hits)
.github/workflows/tests_cuda.yml:47 (2 hits)
.github/workflows/tests_npu.yml:50 (2 hits)
CI/CD securitySupply chainGitHub Actions
high Security checks software dependencies conf 0.90 ✓ Repobility 3 occurrences pre-commit hook `https://github.com/pre-commit/pre-commit-hooks` pinned to mutable rev `v6.0.0`
`.pre-commit-config.yaml` references `https://github.com/pre-commit/pre-commit-hooks` at `rev: v6.0.0`. If `{rev}` is a branch or version tag, the repo owner can push new code there and `pre-commit install --install-hooks` will fetch it on every developer's machine.
lines 2, 16, 22
.pre-commit-config.yaml:2, 16, 22 (3 hits)
high System graph security security conf 1.00 Insecure pattern 'eval_used' in src/llamafactory/model/loader.py:211
Found a known-risky pattern (eval_used). Review and replace if possible.
src/llamafactory/model/loader.py:211 Eval used
high System graph security security conf 1.00 Insecure pattern 'eval_used' in src/llamafactory/train/dpo/trainer.py:109
Found a known-risky pattern (eval_used). Review and replace if possible.
src/llamafactory/train/dpo/trainer.py:109 Eval used
high System graph security security conf 1.00 Insecure pattern 'eval_used' in src/llamafactory/train/kto/trainer.py:111
Found a known-risky pattern (eval_used). Review and replace if possible.
src/llamafactory/train/kto/trainer.py:111 Eval used
high System graph security security conf 1.00 Insecure pattern 'eval_used' in src/llamafactory/train/ppo/trainer.py:253
Found a known-risky pattern (eval_used). Review and replace if possible.
src/llamafactory/train/ppo/trainer.py:253 Eval used
high System graph security security conf 1.00 Insecure pattern 'eval_used' in src/llamafactory/train/sft/trainer.py:106
Found a known-risky pattern (eval_used). Review and replace if possible.
src/llamafactory/train/sft/trainer.py:106 Eval used
medium Security checks security auth conf 0.92 [AUC001] No Repobility access matrix policy found: The repository uses web/API frameworks but does not define .repobility/access.yml or equivalent authorization documentation.
The repository uses web/API frameworks but does not define .repobility/access.yml or equivalent authorization documentation.
medium Security checks security auth conf 0.72 [AUC012] FastAPI interactive docs may be exposed by framework defaults: FastAPI exposes /docs, /redoc, and /openapi.json by default. Public production APIs should explicitly disable those defaults, protect them behind admin authentication, or publish a reviewed OpenAPI spec with declared security requirements.
FastAPI exposes /docs, /redoc, and /openapi.json by default. Public production APIs should explicitly disable those defaults, protect them behind admin authentication, or publish a reviewed OpenAPI spec with declared security requirements.
low Security checks quality Error handling conf 1.00 [ERR001] Silent Exception Swallowing: Silently swallowing all exceptions hides bugs. Even in cleanup code, log at DEBUG level.
Log the error: `except Exception: logger.debug('cleanup failed', exc_info=True)`. Or handle specific exception types.
src/llamafactory/webui/common.py:55
low Security checks quality Error handling conf 1.00 [ERR001] Silent Exception Swallowing: Silently swallowing all exceptions hides bugs. Even in cleanup code, log at DEBUG level.
Log the error: `except Exception: logger.debug('cleanup failed', exc_info=True)`. Or handle specific exception types.
src/llamafactory/extras/env.py:64
medium Security checks software Open redirect conf 1.00 [SEC046] Client-side open redirect — window.location = server-supplied URL: Assigning window.location from a server-supplied URL trusts the server endpoint to never return a hostile destination. If that endpoint is ever subverted (compromised admin, JSON injection, MITM on a webhook), users get redirected to a phishing site they trust because the original page is yours. CWE-601 (server-side OR client-side). Complement to server-side SEC030.
Validate the URL is same-origin or on an explicit allowlist before assignment: const u = new URL(serverUrl, location.href); if (u.origin !== location.origin && !ALLOWED.includes(u.host)) return; location.assign(u); Even better: have the server return a path (/checkout/done) instead of a full …
docs/_static/js/switcher.js:34
low Security checks quality Quality conf 1.00 [SEC136] AI-typical over-broad exception handler swallowing all errors: Catch-all exception block that silently returns success or no-ops. AI agents reach for this pattern when a flaky test or an unfamiliar API throws — wrap, swallow, return success. Real bugs are masked, observability is destroyed, and callers think the operation worked. CWE-396 (improperly-generalized exception). Distinct from intentional fallback because there's no log line and the success value is fabricated.
Catch the specific exception type, log at error level with full exception info, and return a failure-shaped result. If the operation is genuinely best-effort, log at warning and document why in a comment so the next reader (or scanner) knows.
src/llamafactory/webui/common.py:146
low Security checks quality Error handling conf 0.55 ✓ Repobility 15 occurrences Broad exception handler needs review
This handler catches Exception/BaseException. It is actionable when it swallows errors without logging, re-raising, or returning a structured error. Handlers that intentionally convert exceptions into typed error results should not be treated as high risk.
12 files, 15 locations
scripts/qwen_omni_merge.py:86, 135 (2 hits)
src/llamafactory/model/model_utils/valuehead.py:47, 53 (2 hits)
src/llamafactory/webui/common.py:79, 159 (2 hits)
src/llamafactory/data/data_utils.py:194
src/llamafactory/data/parser.py:111
src/llamafactory/extras/misc.py:44
src/llamafactory/extras/packages.py:38
src/llamafactory/train/mca/workflow.py:156
Error handlingquality
high Security checks cicd CI/CD security conf 0.82 5 occurrences Docker final stage has no non-root USER
Docker images run as root unless the image or Dockerfile switches to a non-root user.
5 files, 5 locations
docker/docker-cuda/Dockerfile:3
docker/docker-cuda/Dockerfile.base:3
docker/docker-cuda/Dockerfile.megatron:3
docker/docker-npu/Dockerfile:4
docker/docker-rocm/Dockerfile:4
CI/CD securitycontainers
medium Security checks cicd CI/CD security conf 0.76 3 occurrences Dockerfile copies broad context with incomplete .dockerignore
COPY . or ADD . is safer when .dockerignore excludes secrets, git history, keys, and generated artifacts.
3 files, 3 locations
docker/docker-cuda/Dockerfile:32
docker/docker-npu/Dockerfile:33
docker/docker-rocm/Dockerfile:33
CI/CD securitycontainers
medium Security checks cicd CI/CD security conf 0.90 3 occurrences Dockerfile installs dependencies after copying the full source tree
When dependency installation comes after COPY ., any source change invalidates the dependency layer and makes Docker rebuild much more slowly.
3 files, 3 locations
docker/docker-cuda/Dockerfile:35
docker/docker-npu/Dockerfile:38
docker/docker-rocm/Dockerfile:36
CI/CD securitycontainers
medium Security checks quality Quality conf 1.00 ✓ Repobility 4 occurrences Mutable default argument in `_process_args` (dict)
`def _process_args(... = []/{}/set())` — Python's default value is constructed ONCE at function definition time and shared across all calls. Mutating it in one call mutates it for every future call too.
lines 73, 212, 267, 314
src/llamafactory/chat/hf_engine.py:73, 212, 267, 314 (4 hits)
medium Security checks quality Quality conf 1.00 ✓ Repobility Mutable default argument in `plot_loss` (list)
`def plot_loss(... = []/{}/set())` — Python's default value is constructed ONCE at function definition time and shared across all calls. Mutating it in one call mutates it for every future call too.
src/llamafactory/extras/ploting.py:69
medium Security checks quality Quality conf 0.78 Public web service has no security.txt
security.txt gives researchers and customers a safe disclosure channel. Public web apps and APIs should publish it under /.well-known/security.txt.
.well-known/security.txt
medium System graph cicd CI/CD security conf 1.00 GitHub Actions workflow grants broad write permissions
CI tokens with write permissions increase blast radius when an action, dependency, or PR workflow is compromised. Prefer job-level least-privilege permissions.
.github/workflows/docs.yml CI/CD securitySupply chainGithub actions
medium System graph cicd CI/CD security conf 1.00 GitHub Actions workflow grants broad write permissions
CI tokens with write permissions increase blast radius when an action, dependency, or PR workflow is compromised. Prefer job-level least-privilege permissions.
.github/workflows/publish.yml CI/CD securitySupply chainGithub actions
medium System graph quality Integrity conf 1.00 Network/subprocess call without timeout or try/except — src/llamafactory/api/chat.py:131
`requests.get(...)` here lacks both a `timeout=` arg and an enclosing try/except. This is exactly the class of bug that took down our git-clone earlier (HTTP/2 stream cancel surfaced as a fatal). Add a `timeout=` and wrap in try/except, or use a wrapper that retries.
runtime safetyRobustness
medium System graph quality Integrity conf 1.00 Network/subprocess call without timeout or try/except — src/llamafactory/chat/sglang_engine.py:217
`requests.post(...)` here lacks both a `timeout=` arg and an enclosing try/except. This is exactly the class of bug that took down our git-clone earlier (HTTP/2 stream cancel surfaced as a fatal). Add a `timeout=` and wrap in try/except, or use a wrapper that retries.
runtime safetyRobustness
medium System graph quality Integrity conf 1.00 Network/subprocess call without timeout or try/except — src/llamafactory/launcher.py:93
`subprocess.run(...)` here lacks both a `timeout=` arg and an enclosing try/except. This is exactly the class of bug that took down our git-clone earlier (HTTP/2 stream cancel surfaced as a fatal). Add a `timeout=` and wrap in try/except, or use a wrapper that retries.
runtime safetyRobustness
medium System graph quality Integrity conf 1.00 Network/subprocess call without timeout or try/except — src/llamafactory/train/ppo/ppo_utils.py:38
`requests.post(...)` here lacks both a `timeout=` arg and an enclosing try/except. This is exactly the class of bug that took down our git-clone earlier (HTTP/2 stream cancel surfaced as a fatal). Add a `timeout=` and wrap in try/except, or use a wrapper that retries.
runtime safetyRobustness
medium System graph quality Integrity conf 1.00 Network/subprocess call without timeout or try/except — src/llamafactory/v1/launcher.py:115
`subprocess.run(...)` here lacks both a `timeout=` arg and an enclosing try/except. This is exactly the class of bug that took down our git-clone earlier (HTTP/2 stream cancel surfaced as a fatal). Add a `timeout=` and wrap in try/except, or use a wrapper that retries.
runtime safetyRobustness
medium System graph security Coverage conf 1.00 No auth library detected
The scanner did not find any standard auth library (JWT, OAuth, NextAuth, Auth0, etc.). Either auth lives in custom code, in a separate service, or is missing.
auth
low Security checks cicd CI/CD security conf 0.72 .dockerignore misses sensitive defaults
.dockerignore exists but does not cover common secret or VCS patterns.
.dockerignore CI/CD securitycontainers
high Security checks cicd CI/CD security conf 0.56 4 occurrences Compose service does not declare a runtime user
If the image does not define USER internally, this service may run as root.
3 files, 4 locations
docker/docker-npu/docker-compose.yml:1, 29 (2 hits)
docker/docker-cuda/docker-compose.yml:1
docker/docker-rocm/docker-compose.yml:1
CI/CD securitycontainers
high Security checks cicd CI/CD security conf 0.62 4 occurrences Compose service lacks no-new-privileges hardening
no-new-privileges prevents processes from gaining additional privileges through setuid binaries or file capabilities.
3 files, 4 locations
docker/docker-npu/docker-compose.yml:1, 29 (2 hits)
docker/docker-cuda/docker-compose.yml:1
docker/docker-rocm/docker-compose.yml:1
CI/CD securitycontainers
low Security checks cicd CI/CD security conf 0.72 5 occurrences Dockerfile installs recommended OS packages
Installing recommended packages often pulls in unnecessary runtime surface area.
2 files, 5 locations
docker/docker-cuda/Dockerfile.base:26, 31, 36 (3 hits)
docker/docker-cuda/Dockerfile.megatron:48, 50 (2 hits)
CI/CD securitycontainers
high Security checks cicd CI/CD security conf 0.72 7 occurrences Dockerfile keeps pip download cache
Pip's package cache increases image size and can preserve unnecessary artifacts.
2 files, 7 locations
docker/docker-cuda/Dockerfile.megatron:12, 18, 20, 24, 35, 65 (6 hits)
docker/docker-rocm/Dockerfile:65
CI/CD securitycontainers
low Security checks cicd CI/CD security conf 0.74 4 occurrences Dockerfile leaves apt package indexes in the image layer
Package indexes increase image size and can expose stale metadata in the final image layer.
2 files, 4 locations
docker/docker-cuda/Dockerfile.base:26, 31, 36 (3 hits)
docker/docker-cuda/Dockerfile.megatron:48
CI/CD securitycontainers
low Security checks quality Quality conf 0.60 19 occurrences Duplicated implementation block across source files
Duplicate implementation blocks are maintenance debt. Keep them visible, but they are not a high-severity defect unless the duplicated logic is security-sensitive or drifting.
12 files, 15 locations
src/llamafactory/train/rm/trainer.py:29, 35 (2 hits)
src/llamafactory/train/sft/trainer.py:80, 82 (2 hits)
src/llamafactory/train/sft/workflow.py:50, 84 (2 hits)
scripts/convert_ckpt/llamafy_qwen.py:62
scripts/llama_pro.py:70
src/llamafactory/chat/vllm_engine.py:31
src/llamafactory/data/processor/unsupervised.py:39
src/llamafactory/train/kto/trainer.py:20
duplicationquality
low System graph hardware Coverage conf 1.00 Containers defined but no K8s/orchestration manifest found
Repo has Dockerfiles/compose but no Kubernetes/Nomad manifests. If the target deployment is K8s, the manifests may live in a separate ops repo.
Deployment
low System graph software Dead code candidate conf 1.00 File has no detected symbols: docs/conf.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: docs/en/conf.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: docs/zh/conf.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: scripts/convert_ckpt/tiny_llama4.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: scripts/convert_ckpt/tiny_qwen3.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: src/llamafactory/v1/accelerator/profiler.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: src/llamafactory/v1/core/utils/callback.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: src/llamafactory/v1/plugins/model_plugins/add_token.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: src/llamafactory/v1/plugins/sampler_plugins/vllm.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: src/llamafactory/v1/trainers/dpo_trainer.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: src/llamafactory/v1/utils/constants.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: src/llamafactory/webui/css.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph software Dead code candidate conf 1.00 File has no detected symbols: src/llamafactory/webui/locales.py
Source file with no class/function declarations — possible config, dead code, or scratch file.
low System graph quality Tests conf 1.00 Low test-to-source ratio
40 tests / 224 src (ratio 0.18).
low System graph quality Integrity conf 1.00 15 occurrences Near-duplicate function bodies in 2 places
Functions with the same first-5-line body hash: scripts/megatron_merge.py:convert_mca_to_hf, scripts/megatron_merge.py:convert This is *the* AI-coder failure mode (4× more duplication in vibe-coded repos — see https://jw.hn/ai-code-hygiene). Consolidate or document why they're separate.
15 occurrences
repo-level (15 hits)
duplicatesduplication
low System graph quality Integrity conf 1.00 3 occurrences Near-duplicate function bodies in 3 places
Functions with the same first-5-line body hash: src/webui.py:main, src/llamafactory/webui/interface.py:run_web_ui, src/llamafactory/webui/interface.py:run_web_demo This is *the* AI-coder failure mode (4× more duplication in vibe-coded repos — see https://jw.hn/ai-code-hygiene). Consolidate or docu…
3 occurrences
repo-level (3 hits)
duplicatesduplication
low System graph quality Integrity conf 1.00 2 occurrences Near-duplicate function bodies in 4 places
Functions with the same first-5-line body hash: src/llamafactory/v1/utils/logging.py:info_rank0, src/llamafactory/v1/utils/logging.py:info_rank0, src/llamafactory/extras/logging.py:info_rank0, src/llamafactory/extras/logging.py:info_rank0 This is *the* AI-coder failure mode (4× more duplication in…
2 occurrences
repo-level (2 hits)
duplicatesduplication
low System graph quality Integrity conf 1.00 Old/deprecated-named symbol `deepseek_v2` in src/llamafactory/model/model_utils/moe.py:57
Names with suffixes like `_old`, `_v1`, `_deprecated` usually indicate replaced-but-not-removed code (typical AI-coder leftover). Confirm and delete, or rename if it's the active version.
old markerDead code
low System graph quality Integrity conf 1.00 Old/deprecated-named symbol `kernels_v2` in src/llamafactory/v1/plugins/model_plugins/kernels/interface.py:61
Names with suffixes like `_old`, `_v1`, `_deprecated` usually indicate replaced-but-not-removed code (typical AI-coder leftover). Confirm and delete, or rename if it's the active version.
old markerDead code
low System graph quality Integrity conf 1.00 Old/deprecated-named symbol `mimo_v2` in src/llamafactory/extras/constants.py:1863
Names with suffixes like `_old`, `_v1`, `_deprecated` usually indicate replaced-but-not-removed code (typical AI-coder leftover). Confirm and delete, or rename if it's the active version.
old markerDead code
low System graph quality Integrity conf 1.00 Old/deprecated-named symbol `pissa_backup` in src/llamafactory/train/callbacks.py:152
Names with suffixes like `_old`, `_v1`, `_deprecated` usually indicate replaced-but-not-removed code (typical AI-coder leftover). Confirm and delete, or rename if it's the active version.
old markerDead code
low System graph quality Integrity conf 1.00 Old/deprecated-named symbol `tests_v1` in tests/conftest.py:114
Names with suffixes like `_old`, `_v1`, `_deprecated` usually indicate replaced-but-not-removed code (typical AI-coder leftover). Confirm and delete, or rename if it's the active version.
old markerDead code
low System graph quality Integrity conf 1.00 Old/deprecated-named symbol `tests_v1` in tests_v1/conftest.py:115
Names with suffixes like `_old`, `_v1`, `_deprecated` usually indicate replaced-but-not-removed code (typical AI-coder leftover). Confirm and delete, or rename if it's the active version.
old markerDead code
low System graph software Dead code conf 1.00 Possibly dead Python function: bench_qwen
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/bench_qwen.py:119
low System graph software Dead code conf 1.00 Possibly dead Python function: block_expansion
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/llama_pro.py:40
low System graph software Dead code conf 1.00 Possibly dead Python function: calculate_flops
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/stat_utils/cal_flops.py:26
low System graph software Dead code conf 1.00 Possibly dead Python function: calculate_lr
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/stat_utils/cal_lr.py:37
low System graph software Dead code conf 1.00 Possibly dead Python function: calculate_mfu
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/stat_utils/cal_mfu.py:101
low System graph software Dead code conf 1.00 Possibly dead Python function: calculate_ppl
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/stat_utils/cal_ppl.py:55
low System graph software Dead code conf 1.00 Possibly dead Python function: can_quantize
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/control.py:50
low System graph software Dead code conf 1.00 Possibly dead Python function: can_quantize_to
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/control.py:62
low System graph software Dead code conf 1.00 Possibly dead Python function: change_lang
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/engine.py:77
low System graph software Dead code conf 1.00 Possibly dead Python function: change_stage
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/control.py:78
low System graph software Dead code conf 1.00 Possibly dead Python function: check_template
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/control.py:96
low System graph software Dead code conf 1.00 Possibly dead Python function: length_cdf
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/stat_utils/length_cdf.py:25
low System graph software Dead code conf 1.00 Possibly dead Python function: list_checkpoints
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/control.py:160
low System graph software Dead code conf 1.00 Possibly dead Python function: list_config_paths
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/control.py:182
low System graph software Dead code conf 1.00 Possibly dead Python function: list_datasets
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/control.py:197
low System graph software Dead code conf 1.00 Possibly dead Python function: list_output_dirs
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/control.py:209
low System graph software Dead code conf 1.00 Possibly dead Python function: llamafy_baichuan2
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/convert_ckpt/llamafy_baichuan2.py:91
low System graph software Dead code conf 1.00 Possibly dead Python function: llamafy_qwen
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/convert_ckpt/llamafy_qwen.py:144
low System graph software Dead code conf 1.00 Possibly dead Python function: quantize_loftq
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/loftq_init.py:30
low System graph software Dead code conf 1.00 Possibly dead Python function: quantize_pissa
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/pissa_init.py:30
low System graph software Dead code conf 1.00 Possibly dead Python function: save_full_model
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/qwen_omni_merge.py:90
low System graph software Dead code conf 1.00 Possibly dead Python function: switch_hub
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/control.py:41
low System graph software Dead code conf 1.00 Possibly dead Python function: unload_model
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
src/llamafactory/webui/chatter.py:161
low System graph software Dead code conf 1.00 Possibly dead Python function: vllm_infer
No callers detected by AST scan in this repo. Could be exported for external callers or a framework handler.
scripts/vllm_infer.py:47
low System graph quality Integrity conf 1.00 Stub function `make_tensor_descriptor` (body is just `pass`/`return`) — src/llamafactory/third_party/triton/utils.py:146
Likely an AI scaffold that was never filled in. Remove or implement.
Empty handlerDead code
low System graph quality Integrity conf 1.00 Stub function `zero_grad` (body is just `pass`/`return`) — src/llamafactory/train/trainer_utils.py:79
Likely an AI scaffold that was never filled in. Remove or implement.
Empty handlerDead code
low System graph api Wiring conf 1.00 Unused endpoint: GET /v1/models
`src/llamafactory/api/app.py` declares `GET /v1/models` but no frontend code we scanned calls it. This is fine if the endpoint serves external clients (mobile app, third-party, server-side webhooks). Otherwise it's dead code — consider removing or documenting who consumes it.
Unused endpoint
low System graph api Wiring conf 1.00 Unused endpoint: POST /v1/chat/completions
`src/llamafactory/api/app.py` declares `POST /v1/chat/completions` but no frontend code we scanned calls it. This is fine if the endpoint serves external clients (mobile app, third-party, server-side webhooks). Otherwise it's dead code — consider removing or documenting who consumes it.
Unused endpoint
low System graph api Wiring conf 1.00 Unused endpoint: POST /v1/score/evaluation
`src/llamafactory/api/app.py` declares `POST /v1/score/evaluation` but no frontend code we scanned calls it. This is fine if the endpoint serves external clients (mobile app, third-party, server-side webhooks). Otherwise it's dead code — consider removing or documenting who consumes it.
Unused endpoint
low System graph quality Complexity conf 1.00 Very large file: src/llamafactory/extras/constants.py (3614 lines)
Files with >800 lines often hide complexity hotspots and discourage tests.
low System graph quality Complexity conf 1.00 Very large file: src/llamafactory/webui/locales.py (3183 lines)
Files with >800 lines often hide complexity hotspots and discourage tests.
For AI agents: Voting guide (TP/FP) MCP manifest Stdio wrapper SARIF Integrate Findings queue Vote TP/FP on findings to calibrate the engine.
For AI agents + API integrations
Email me when this repo regresses
Free. We re-scan periodically; new criticals → your inbox. No signup required for the scan itself.
API access

This page is publicly accessible at: https://repobility.com/scan/8370691f-4f2c-4b46-ba68-f1d31066d05f/

To check status programmatically (no auth required):

curl -s https://repobility.com/api/v1/public/scan/8370691f-4f2c-4b46-ba68-f1d31066d05f/

Important — please don't re-submit the same URL repeatedly. The submission endpoint is idempotent: re-submitting the same git URL returns this same scan_token, not a new one. To re-scan this repo, sign up free and use the dashboard.