AI Slop Code RIsk Monitor

FlashML-org/FreeToken

FreeToken brings datacenter-scale model serving to your desktop. Run massive models locally, fast and efficiently.

26.7 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for FlashML-org/FreeToken, a Python project with 14,398 GitHub stars. SynthScan examined 148,986 lines of code across 669 source files, recording 3199 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 26.7 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

26.7
Adjusted Signal
26.7
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
14.4K
Stars
Python
Language
149.0K
Lines of Code
669
Files
3.2K
Pattern Hits
2026-10-12
Scan Date
0.13
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 41.9/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 1596 finding(s).

Hallucinated Dependency & Supply Chain Risk 26.5/100 · MEDIUM

Are imports declared and package/API names verified? 924 finding(s).

Agent Over-Engineering Ratio 60.6/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 2018 finding(s).

PR Review Velocity Impact 74.2/100 · HIGH

Which changes need focused human review? 3199 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 2HIGH 85MEDIUM 198LOW 2914

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 3199 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers1321 hits · 1318 pts
SeverityFileLineSnippetContext
LOWfreetoken-kernel-cache/build_backend.py15def _ensure_freetoken_importable() -> None:CODE
LOWfreetoken-kernel-cache/build_backend.py126def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None):CODE
LOWpython/freetoken/launch.py357def _remove_toml_root_string_value(text: str, key: str, value: str) -> str:CODE
LOWpython/freetoken/launch.py378def _codex_migrated_base_config_text(existing: str) -> str:CODE
LOWpython/freetoken/launch.py581def _openclaw_has_freetoken_provider(config: dict[str, object]) -> bool:CODE
LOWpython/freetoken/launch.py591def _confirm_openclaw_first_patch(ctx: LaunchContext, config_path: Path) -> bool:CODE
LOWpython/freetoken/launch.py657def _clear_openclaw_session_overrides(primary_model: str) -> None:CODE
LOWpython/freetoken/benchmark/perf.py54def compare_memory_kernel_perf(CODE
LOW⚡python/freetoken/benchmark/client.py313def process_benchmark_results(raw_data: List[RawResult], tokenizer: Any) -> BenchmarkResult: ...CODE
LOW⚡python/freetoken/benchmark/client.py317def process_benchmark_results(raw_data: List[RawResult]) -> None: ...CODE
LOW⚡python/freetoken/benchmark/client.py320def process_benchmark_results(CODE
LOWpython/freetoken/attention/__init__.py155def create_qsa_sparse_backend(config: ModelConfig):CODE
LOWpython/freetoken/attention/fi.py147 def _initialize_metadata_once(self, metadata: FIMetadata) -> None:CODE
LOWpython/freetoken/attention/dsv41_sparse.py387 def select_topk_in_candidates(scores: torch.Tensor, candidates: torch.Tensor, topk: int) -> torch.Tensor:CODE
LOWpython/freetoken/layers/mhc.py188def mhc_fused_post_pre_single_pass_torch(CODE
LOWpython/freetoken/layers/mhc.py213def mhc_fused_post_pre_single_pass(CODE
LOWpython/freetoken/distributed/impl.py73def enable_pynccl_distributed(CODE
LOWpython/freetoken/shell/tui.py60def _format_shell_model_label(model_id: str) -> str:CODE
LOWpython/freetoken/scheduler/config.py34 def zmq_scheduler_broadcast_addr(self) -> str:CODE
LOWpython/freetoken/scheduler/config.py42 def backend_create_detokenizer_link(self) -> bool:CODE
LOWpython/freetoken/scheduler/cache.py180 def maybe_free_swa_out_of_window(self, reqs: List[Req], *, forward_iter: int) -> None:CODE
LOWpython/freetoken/scheduler/cache.py219 def free_swa_out_of_window_extend(self, reqs: List[Req]) -> None:CODE
LOWpython/freetoken/scheduler/scheduler.py875 def _report_prompt_admissions(self, batch: Batch) -> None:CODE
LOWpython/freetoken/server/anthropic_api.py78def register_anthropic_routes(CODE
LOWpython/freetoken/server/anthropic_api.py110async def handle_anthropic_messages(CODE
LOWpython/freetoken/server/anthropic_api.py147async def handle_anthropic_count_tokens(req: AnthropicCountTokensRequest, state: Any):CODE
LOWpython/freetoken/server/anthropic_api.py313def convert_anthropic_to_genspec(CODE
LOW⚡python/freetoken/server/anthropic_api.py636def _validation_error_message(exc: RequestValidationError) -> str:CODE
LOW⚡python/freetoken/server/anthropic_api.py647def _anthropic_error_response(CODE
LOWpython/freetoken/server/reasoning_parser.py69def _longest_harmony_partial_suffix(text: str) -> int:CODE
LOWpython/freetoken/server/reasoning_parser.py156 def parse_streaming_increment(self, new_text: str) -> ReasoningParseResult:CODE
LOWpython/freetoken/server/reasoning_parser.py307 def parse_streaming_increment(self, new_text: str) -> ReasoningParseResult:CODE
LOWpython/freetoken/server/reasoning_parser.py494 def parse_streaming_increment(self, new_text: str) -> ReasoningParseResult:CODE
LOWpython/freetoken/server/reasoning_parser.py593def _longest_atem_partial_suffix(text: str) -> int:CODE
LOWpython/freetoken/server/reasoning_parser.py700 def parse_streaming_increment(self, new_text: str) -> ReasoningParseResult:CODE
LOWpython/freetoken/server/responses_api.py111def register_responses_routes(CODE
LOWpython/freetoken/server/responses_api.py188def convert_responses_to_genspec(CODE
LOWpython/freetoken/server/responses_api.py496async def responses_stream_generator(CODE
LOWpython/freetoken/server/accounting.py133def register_accounting_routes(app: FastAPI, get_state: Callable[[], Any]) -> None:CODE
LOWpython/freetoken/server/access_log_filter.py80def install_polling_access_log_filter() -> None:CODE
LOW⚡python/freetoken/server/function_call_parser.py3686 def parse_streaming_increment(self, new_text: str) -> StreamingParseResult:CODE
LOW⚡python/freetoken/server/function_call_parser.py3695 def args_fragments_prefix_stable(self) -> bool:CODE
LOWpython/freetoken/server/function_call_parser.py63def _should_forward_unknown_tool(name: Any) -> bool:CODE
LOWpython/freetoken/server/function_call_parser.py436 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py711 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py970 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py1333 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py1687 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py1994 def _build_partial_arguments_json(self, func_name: str, partial_body: str, tools: List[Tool]) -> Optional[str]:CODE
LOWpython/freetoken/server/function_call_parser.py2106 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py2787 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py2965 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py3197 def _finalize_truncated_invoke(self, reason: str = "tool channel closed") -> List[ToolCallItem]:CODE
LOWpython/freetoken/server/function_call_parser.py3308 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/openai_api.py242async def stream_chat_completion_chunks(CODE
LOWpython/freetoken/server/openai_api.py650def _response_format_unsupported(response_format: dict[str, Any] | None) -> bool:CODE
LOWpython/freetoken/server/openai_api.py655def _completion_unsupported_reason(req: CompletionRequest) -> str | None:CODE
LOWpython/freetoken/server/api_server.py71def _terminate_backend_workers(processes: List[Any]) -> None:CODE
LOWpython/freetoken/server/api_server.py90def _exit_after_backend_death(grace_s: float) -> threading.Timer:CODE
LOWpython/freetoken/server/api_server.py486async def _record_request_middleware(request: Request, call_next):CODE
1261 more matches not shown…
Unused Imports918 hits · 886 pts
SeverityFileLineSnippetContext
LOWsetup.py1CODE
LOWfreetoken-kernel-cache/build_backend.py1CODE
LOWfreetoken-kernel-cache/setup.py1CODE
LOW…etoken-kernel-cache/freetoken_kernel_cache/__init__.py1CODE
LOWpython/freetoken/env.py1CODE
LOWpython/freetoken/cache_report.py10CODE
LOWpython/freetoken/__init__.py3CODE
LOWpython/freetoken/core.py1CODE
LOWpython/freetoken/core.py11CODE
LOWpython/freetoken/launch.py1CODE
LOWpython/freetoken/cli.py1CODE
LOWpython/freetoken/gpu_select.py16CODE
LOWpython/freetoken/control_cli.py1CODE
LOWpython/freetoken/benchmark/perf.py1CODE
LOWpython/freetoken/benchmark/client.py1CODE
LOWpython/freetoken/attention/dsa_indexer.py17CODE
LOWpython/freetoken/attention/dsv4_sparse.py30CODE
LOWpython/freetoken/attention/triton.py1CODE
LOWpython/freetoken/attention/linear.py1CODE
LOWpython/freetoken/attention/linear.py9CODE
LOWpython/freetoken/attention/__init__.py1CODE
LOWpython/freetoken/attention/__init__.py8CODE
LOWpython/freetoken/attention/__init__.py8CODE
LOWpython/freetoken/attention/qsa_sparse.py32CODE
LOWpython/freetoken/attention/fi.py1CODE
LOWpython/freetoken/attention/dsv4_compress.py18CODE
LOWpython/freetoken/attention/dsa_indexer_kpool.py31CODE
LOWpython/freetoken/attention/dsa_indexer_kpool.py40CODE
LOWpython/freetoken/attention/dsa_indexer_kpool.py41CODE
LOWpython/freetoken/attention/dsa.py31CODE
LOWpython/freetoken/attention/m3_sparse.py30CODE
LOWpython/freetoken/attention/dsv41_sparse.py22CODE
LOWpython/freetoken/attention/trtllm.py1CODE
LOWpython/freetoken/attention/base.py1CODE
LOWpython/freetoken/attention/dsv4_indexer.py14CODE
LOWpython/freetoken/attention/fa.py1CODE
LOWpython/freetoken/llm/__init__.py1CODE
LOWpython/freetoken/llm/llm.py1CODE
LOWpython/freetoken/checkpoint/ftw.py33CODE
LOWpython/freetoken/checkpoint/convert.py16CODE
LOWpython/freetoken/checkpoint/__init__.py7CODE
LOWpython/freetoken/checkpoint/__init__.py7CODE
LOWpython/freetoken/checkpoint/__init__.py7CODE
LOWpython/freetoken/checkpoint/__init__.py7CODE
LOWpython/freetoken/checkpoint/__init__.py7CODE
LOWpython/freetoken/checkpoint/__init__.py14CODE
LOWpython/freetoken/checkpoint/__main__.py10CODE
LOWpython/freetoken/layers/gguf.py14CODE
LOWpython/freetoken/layers/embedding.py1CODE
LOWpython/freetoken/layers/mhc.py34CODE
LOWpython/freetoken/layers/linear.py1CODE
LOWpython/freetoken/layers/__init__.py1CODE
LOWpython/freetoken/layers/__init__.py1CODE
LOWpython/freetoken/layers/__init__.py1CODE
LOWpython/freetoken/layers/__init__.py1CODE
LOWpython/freetoken/layers/__init__.py1CODE
LOWpython/freetoken/layers/__init__.py1CODE
LOWpython/freetoken/layers/__init__.py1CODE
LOWpython/freetoken/layers/__init__.py10CODE
LOWpython/freetoken/layers/__init__.py10CODE
858 more matches not shown…
Decorative Section Separators178 hits · 618 pts
SeverityFileLineSnippetContext
MEDIUMpython/freetoken/layers/moe.py253 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/moe.py259 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/moe.py403 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/moe.py406 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/quantization/scheme.py74# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/quantization/scheme.py76# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/quantization/moe/nvfp4.py81# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/quantization/moe/nvfp4.py92# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/quantization/moe/nvfp4.py282# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/quantization/moe/nvfp4.py300# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/server/function_call_parser.py3166 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/server/function_call_parser.py3168 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/server/function_call_parser.py3481 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/server/function_call_parser.py3483 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/loader.py154# ---------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/loader.py160# ---------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/gemma4/gguf.py143# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/gemma4/gguf.py145# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/gemma4/gguf.py301# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/gemma4/gguf.py303# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/gemma4/gguf.py378# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/gemma4/gguf.py380# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/qwen3_5_moe/weight.py327# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen3_5_moe/weight.py329# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/deepseek_v4/weight.py177# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/deepseek_v4/weight.py179# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/deepseek_v4/weight.py229# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/deepseek_v4/weight.py231# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/glm4_moe/weight.py40# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/glm4_moe/weight.py42# --------------------------------------------------------------------------------------COMMENT
MEDIUM⚡python/freetoken/models/glm4_moe/weight.py192# --------------------------------------------------------------------------------------COMMENT
MEDIUM⚡python/freetoken/models/glm4_moe/weight.py194# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/qwen4_exp/weight.py247# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen4_exp/weight.py249# ======================================================================================COMMENT
MEDIUM⚡python/freetoken/models/qwen4_exp/weight.py380# ======================================================================================COMMENT
MEDIUM⚡python/freetoken/models/qwen4_exp/weight.py382# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_blockscale_moe.py130# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_blockscale_moe.py134# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py94# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py96# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py172# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py175# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py229# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py244# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py355# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py356# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py34# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py36# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py84# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py86# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py157# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py161# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fused_moe.py219 # -----------------------------------------------------------COMMENT
MEDIUMpython/freetoken/kernel/triton/fused_moe.py232 # ----------------------------------------------------------COMMENT
MEDIUMpython/freetoken/kernel/triton/fused_moe.py260 # -----------------------------------------------------------COMMENT
MEDIUMpython/freetoken/kernel/triton/fused_moe.py297 # -----------------------------------------------------------COMMENT
MEDIUM⚡python/freetoken/kernel/triton/minimax_m3_sparse.py100# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡python/freetoken/kernel/triton/minimax_m3_sparse.py104# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡python/freetoken/kernel/triton/minimax_m3_sparse.py287# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡python/freetoken/kernel/triton/minimax_m3_sparse.py290# ---------------------------------------------------------------------------COMMENT
118 more matches not shown…
Empty Error Handlers66 hits · 330 pts
SeverityFileLineSnippetContext
HIGHpython/freetoken/env.py27except Exception:CODE
HIGHpython/freetoken/control_cli.py493except ControlCliError:CODE
HIGHpython/freetoken/llm/llm.py118except RequestAllFinished:CODE
HIGHpython/freetoken/checkpoint/ftw.py285except (AttributeError, OSError):CODE
HIGHpython/freetoken/checkpoint/convert.py48except Exception:CODE
HIGHpython/freetoken/shell/tui.py750except (EOFError, KeyboardInterrupt):CODE
HIGHpython/freetoken/tokenizer/server.py264except KeyboardInterrupt:CODE
HIGHpython/freetoken/server/request_logger.py127except Exception: # noqa: BLE001CODE
HIGHpython/freetoken/server/generation.py235except json.JSONDecodeError:CODE
HIGHpython/freetoken/server/function_call_parser.py222except ValueError:CODE
HIGHpython/freetoken/server/api_server.py317except RuntimeError:CODE
HIGHpython/freetoken/server/api_server.py232except Exception: # noqa: BLE001 -- warmup only; real faults surface on useCODE
HIGHpython/freetoken/server/launch.py27except Exception: # noqa: BLE001 -- reporting is a nicety; never shadow the real exceptionCODE
HIGHpython/freetoken/server/launch.py45except OSError: # no job control (already a group leader / unusual environment)CODE
HIGHpython/freetoken/server/launch.py104except Exception: # noqa: BLE001 -- metadata is a nicety; readiness is notCODE
HIGHpython/freetoken/utils/arch.py47except (AttributeError, RuntimeError):CODE
HIGHpython/freetoken/utils/progress.py41except Exception: # noqa: BLE001 — progress reporting must never break loadCODE
HIGHpython/freetoken/utils/progress.py71except Exception: # noqa: BLE001 — progress reporting must never break loadCODE
HIGHpython/freetoken/utils/hf.py45except Exception:CODE
HIGHpython/freetoken/models/weight.py114except OSError:CODE
HIGHpython/freetoken/models/loader.py82except OSError:CODE
HIGHpython/freetoken/models/loader.py205except Exception: # noqa: BLE001 -- best-effort handle cleanupCODE
HIGHpython/freetoken/models/minimax_m3/weight.py86except Exception: # pragma: no cover - best effortCODE
HIGHpython/freetoken/models/gguf/tokenizer.py70except ValueError:CODE
HIGHpython/freetoken/models/deepseek_v4/weight.py51except Exception:CODE
HIGHpython/freetoken/models/glm_moe_dsa/weight.py54except Exception: # pragma: no cover - best effortCODE
HIGHpython/freetoken/models/glm4_moe/weight.py69except Exception: # pragma: no cover - best effortCODE
HIGHpython/freetoken/kvcache/cache_status.py61except Exception: # noqa: BLE001 -- best-effort; a bad read must never block readinessCODE
HIGHpython/freetoken/kvcache/cache_status.py161except Exception: # noqa: BLE001 -- best-effort; readiness must not depend on thisCODE
HIGHpython/freetoken/daemon/tailer.py75except Exception: # noqa: BLE001 — the tailer must never take the daemon downCODE
HIGHpython/freetoken/daemon/tailer.py81except OSError:CODE
HIGHpython/freetoken/daemon/pidfile.py80except FileNotFoundError:CODE
HIGHpython/freetoken/daemon/pidfile.py91except FileNotFoundError:CODE
HIGHpython/freetoken/daemon/pidfile.py93except OSError: # pragma: no cover - defensiveCODE
HIGHpython/freetoken/daemon/pidfile.py47except OSError:CODE
HIGHpython/freetoken/daemon/server.py83except OSError:CODE
HIGHpython/freetoken/daemon/server.py75except (ValueError, OSError): # pragma: no cover - non-main-thread / unsupportedCODE
HIGHpython/freetoken/daemon/server.py96except Exception: # noqa: BLE001CODE
HIGHpython/freetoken/daemon/accounting.py157except OSError:CODE
HIGHpython/freetoken/daemon/accounting.py91except OSError:CODE
HIGHpython/freetoken/daemon/checkpoint.py173except Exception: # noqa: BLE001CODE
HIGHpython/freetoken/daemon/checkpoint.py128except Exception: # noqa: BLE001CODE
HIGHpython/freetoken/daemon/client.py114except KeyboardInterrupt:CODE
HIGHpython/freetoken/daemon/serve_manager.py948except Exception: # noqa: BLE001 — logging must never break control flowCODE
HIGHpython/freetoken/daemon/serve_manager.py744except Exception: # noqa: BLE001CODE
HIGHpython/freetoken/daemon/serve_manager.py835except Exception: # noqa: BLE001CODE
HIGHpython/freetoken/daemon/app.py486except RuntimeError: # loop is closing during shutdownCODE
HIGHpython/freetoken/daemon/app.py146except Exception: # noqa: BLE001CODE
HIGHpython/freetoken/daemon/app.py417except Exception: # noqa: BLE001 -- the arg below is the fallbackCODE
HIGHpython/freetoken/daemon/app.py480except asyncio.QueueEmpty: # pragma: no cover - race-onlyCODE
HIGHpython/freetoken/daemon/osproc.py127except ProcessLookupError:CODE
HIGHpython/freetoken/daemon/osproc.py129except OSError: # pragma: no cover - defensiveCODE
HIGHpython/freetoken/daemon/logring.py42except Exception: # noqa: BLE001 — a broken subscriber must never kill the tailerCODE
HIGHpython/freetoken/moe/bench_profile.py64except OSError:CODE
HIGHpython/freetoken/moe/host_banks.py392except OSError:CODE
HIGHpython/freetoken/moe/host_banks.py443except OSError:CODE
HIGHpython/freetoken/moe/host_banks.py188except (OSError, ValueError):CODE
HIGHpython/freetoken/moe/benchbw.py226except (AttributeError, OSError):CODE
HIGHpython/freetoken/moe/expert_banks.py226except OSError:CODE
HIGHpython/freetoken/kernel/utils.py117except ImportError:CODE
6 more matches not shown…
Modern Structural Boilerplate297 hits · 296 pts
SeverityFileLineSnippetContext
LOW…etoken-kernel-cache/freetoken_kernel_cache/__init__.py17__all__ = ["__version__", "get_jit_cache_dir", "jit_cache_dir"]CODE
LOWpython/freetoken/__init__.py5__all__ = ["__version__"]CODE
LOWpython/freetoken/launch.py511def _update_opencode_state(path: Path, model_ids: list[str]) -> None:CODE
LOWpython/freetoken/gpu_select.py197def set_assigned_gpu(target: str) -> None:CODE
LOWpython/freetoken/attention/dsa_indexer.py60__all__ = ["DSAIndexerMixin"]CODE
LOWpython/freetoken/attention/dsv4_sparse.py291__all__ = ["DSV4SparseAttnBackend", "DSV4AttnMetadata"]CODE
LOWpython/freetoken/attention/linear.py140__all__ = ["FLAMetadata", "build_fla_metadata"]CODE
LOWpython/freetoken/attention/__init__.py199__all__ = [CODE
LOWpython/freetoken/attention/qsa_sparse.py345 def _update_index_cache(self, index, md: QSASparseMetadata, slot: int) -> None:CODE
LOWpython/freetoken/attention/qsa_sparse.py542__all__ = ["QSASparseAttnBackend", "QSASparseMetadata"]CODE
LOWpython/freetoken/attention/dsv4_compress.py154__all__ = ["CompressorBackendMixin"]CODE
LOWpython/freetoken/attention/dsa_indexer_kpool.py288__all__ = ["Glm5NextDSABackend"]CODE
LOWpython/freetoken/attention/dsa.py376__all__ = ["DSAAttnBackend", "DSAMetadata"]CODE
LOWpython/freetoken/attention/m3_sparse.py443__all__ = ["M3SparseAttnBackend", "M3SparseMetadata"]CODE
LOWpython/freetoken/attention/dsv41_sparse.py438__all__ = ["DSV41SparseAttnBackend", "DSV41AttnMetadata", "PrefillSegment", "SharedSelection"]CODE
LOWpython/freetoken/attention/dsv4_indexer.py87__all__ = ["IndexerBackendMixin"]CODE
LOWpython/freetoken/llm/__init__.py3__all__ = ["LLM"]CODE
LOWpython/freetoken/checkpoint/ftw.py738__all__ = [CODE
LOWpython/freetoken/checkpoint/convert.py327__all__ = ["convert_checkpoint"]CODE
LOWpython/freetoken/checkpoint/__init__.py16__all__ = [CODE
LOWpython/freetoken/layers/gguf.py128__all__ = ["GGUFLinear", "GGUFEmbedding", "fused_mul_mat_gguf"]CODE
LOWpython/freetoken/layers/mhc.py241__all__ = [CODE
LOWpython/freetoken/layers/__init__.py31__all__ = [CODE
LOWpython/freetoken/layers/activation.py86__all__ = [CODE
LOWpython/freetoken/layers/rotary.py346__all__ = [CODE
LOWpython/freetoken/layers/quantization/quant_backend.py73def set_quant_backend(backend: QuantBackend) -> None:CODE
LOWpython/freetoken/layers/quantization/__init__.py41__all__ = [CODE
LOWpython/freetoken/layers/quantization/linear/__init__.py9__all__ = [CODE
LOW…thon/freetoken/layers/quantization/configs/__init__.py22def set_quant_config(quant: QuantConfig | None) -> None:CODE
LOW…thon/freetoken/layers/quantization/configs/__init__.py34__all__ = [CODE
LOWpython/freetoken/layers/quantization/moe/__init__.py9__all__ = [CODE
LOWpython/freetoken/distributed/__init__.py4__all__ = [CODE
LOWpython/freetoken/distributed/info.py21def set_tp_info(rank: int, size: int) -> None:CODE
LOWpython/freetoken/distributed/info.py38__all__ = ["DistributedInfo", "set_tp_info", "get_tp_info", "try_get_tp_info"]CODE
LOWpython/freetoken/shell/__init__.py86__all__ = ["main"]CODE
LOWpython/freetoken/shell/tui.py241 def set_prompt_tokens(self, count: int) -> None:CODE
LOWpython/freetoken/tokenizer/__init__.py3__all__ = ["tokenize_worker"]CODE
LOWpython/freetoken/scheduler/__init__.py4__all__ = ["Scheduler", "SchedulerConfig"]CODE
LOWpython/freetoken/scheduler/mm.py91__all__ = ["cut_image_spans", "mm_chunk_end", "mm_rows_after", "plan_mm_batch", "plan_mm_chunk"]CODE
LOWpython/freetoken/message/__init__.py23__all__ = [CODE
LOWpython/freetoken/server/__init__.py3__all__ = ["launch_server"]CODE
LOWpython/freetoken/server/function_call_parser.py51logger = logging.getLogger(__name__)CODE
LOWpython/freetoken/server/function_call_parser.py728 def _update_prev() -> None:CODE
LOWpython/freetoken/server/function_call_parser.py1353 def _update_prev() -> None:CODE
LOWpython/freetoken/server/function_call_parser.py1711 def _update_prev_args() -> None:CODE
LOWpython/freetoken/server/function_call_parser.py2129 def _update_prev() -> None:CODE
LOWpython/freetoken/utils/__init__.py31__all__ = [CODE
LOWpython/freetoken/utils/progress.py20def set_progress_sink(sink: Optional[Callable[[str, int, int], None]]) -> None:CODE
LOWpython/freetoken/utils/progress.py90__all__ = ["byte_bar", "count_bar", "set_progress_sink"]CODE
LOWpython/freetoken/models/register.py363__all__ = ["ModelSpec", "checkpoint_quant_config", "get_model_spec", "get_model_class"]CODE
LOWpython/freetoken/models/__init__.py21__all__ = [CODE
LOWpython/freetoken/models/weight.py283__all__ = [CODE
LOWpython/freetoken/models/weight_stream.py122__all__ = ["BlockWeightStreamer"]CODE
LOWpython/freetoken/models/loader.py302__all__ = [CODE
LOWpython/freetoken/models/nvfp4_banks.py138__all__ = ["Nvfp4ExpertSourceSpec", "iter_nvfp4_expert_pieces"]CODE
LOWpython/freetoken/models/blocks.py93__all__ = ["BaseLLMModel", "GatedMLP"]CODE
LOWpython/freetoken/models/gpt_oss/attention.py97__all__ = ["GptOssAttention"]CODE
LOWpython/freetoken/models/gpt_oss/config.py113__all__ = ["parse_config"]CODE
LOWpython/freetoken/models/gpt_oss/__init__.py5__all__ = ["GptOssForCausalLM", "parse_config", "iter_weights", "iter_expert_pieces"]CODE
LOWpython/freetoken/models/gpt_oss/weight.py345__all__ = [CODE
237 more matches not shown…
Deep Nesting154 hits · 141 pts
SeverityFileLineSnippetContext
LOWpython/freetoken/gpu_select.py71CODE
LOWpython/freetoken/gpu_select.py127CODE
LOWpython/freetoken/control_cli.py434CODE
LOWpython/freetoken/benchmark/perf.py10CODE
LOWpython/freetoken/checkpoint/ftw.py472CODE
LOWpython/freetoken/checkpoint/ftw.py675CODE
LOWpython/freetoken/checkpoint/ftw.py272CODE
LOWpython/freetoken/checkpoint/convert.py165CODE
LOWpython/freetoken/layers/moe.py443CODE
LOWpython/freetoken/layers/rotary.py96CODE
LOWpython/freetoken/layers/quantization/method.py64CODE
LOWpython/freetoken/layers/quantization/method.py71CODE
LOWpython/freetoken/shell/tui.py533CODE
LOWpython/freetoken/shell/tui.py611CODE
LOWpython/freetoken/tokenizer/server.py127CODE
LOWpython/freetoken/tokenizer/inline_system.py74CODE
LOWpython/freetoken/tokenizer/inline_system.py124CODE
LOWpython/freetoken/tokenizer/tokenize.py243CODE
LOWpython/freetoken/scheduler/cache.py591CODE
LOWpython/freetoken/scheduler/prefill.py294CODE
LOWpython/freetoken/scheduler/mm.py37CODE
LOWpython/freetoken/scheduler/mm.py67CODE
LOWpython/freetoken/scheduler/scheduler.py312CODE
LOWpython/freetoken/scheduler/scheduler.py488CODE
LOWpython/freetoken/server/anthropic_api.py186CODE
LOWpython/freetoken/server/anthropic_api.py431CODE
LOWpython/freetoken/server/reasoning_parser.py348CODE
LOWpython/freetoken/server/reasoning_parser.py726CODE
LOWpython/freetoken/server/responses_api.py188CODE
LOWpython/freetoken/server/responses_api.py496CODE
LOWpython/freetoken/server/generation.py207CODE
LOWpython/freetoken/server/generation.py243CODE
LOWpython/freetoken/server/generation.py389CODE
LOWpython/freetoken/server/generation.py595CODE
LOWpython/freetoken/server/generation.py654CODE
LOWpython/freetoken/server/supervisor.py99CODE
LOWpython/freetoken/server/function_call_parser.py182CODE
LOWpython/freetoken/server/function_call_parser.py352CODE
LOWpython/freetoken/server/function_call_parser.py363CODE
LOWpython/freetoken/server/function_call_parser.py436CODE
LOWpython/freetoken/server/function_call_parser.py711CODE
LOWpython/freetoken/server/function_call_parser.py1069CODE
LOWpython/freetoken/server/function_call_parser.py1333CODE
LOWpython/freetoken/server/function_call_parser.py1687CODE
LOWpython/freetoken/server/function_call_parser.py2106CODE
LOWpython/freetoken/server/function_call_parser.py2534CODE
LOWpython/freetoken/server/function_call_parser.py2572CODE
LOWpython/freetoken/server/function_call_parser.py2787CODE
LOWpython/freetoken/server/function_call_parser.py2965CODE
LOWpython/freetoken/server/function_call_parser.py3308CODE
LOWpython/freetoken/server/openai_api.py242CODE
LOWpython/freetoken/utils/arch.py25CODE
LOWpython/freetoken/models/config.py463CODE
LOWpython/freetoken/models/weight.py68CODE
LOWpython/freetoken/models/weight.py155CODE
LOWpython/freetoken/models/weight.py105CODE
LOWpython/freetoken/models/loader.py222CODE
LOWpython/freetoken/models/loader.py249CODE
LOWpython/freetoken/models/nvfp4_banks.py66CODE
LOWpython/freetoken/models/nvfp4_banks.py111CODE
94 more matches not shown…
Excessive Try-Catch Wrapping122 hits · 129 pts
SeverityFileLineSnippetContext
LOWfreetoken-kernel-cache/build_backend.py39 except Exception:CODE
LOWpython/freetoken/env.py27 except Exception:CODE
LOWpython/freetoken/attention/qsa_sparse.py65 except Exception as exc:CODE
LOWpython/freetoken/checkpoint/convert.py48 except Exception:CODE
LOWpython/freetoken/checkpoint/convert.py304 except Exception:CODE
LOWpython/freetoken/layers/quantization/linear/nvfp4.py53 except Exception as exc:CODE
LOWpython/freetoken/layers/quantization/moe/nvfp4.py115 except Exception as exc:CODE
LOWpython/freetoken/layers/quantization/moe/nvfp4.py323 except Exception as exc:CODE
LOWpython/freetoken/layers/quantization/moe/nvfp4.py340 except Exception:CODE
LOWpython/freetoken/tokenizer/server.py99 except Exception as exc: # noqa: BLE001 — isolate, never crash the workerCODE
LOWpython/freetoken/tokenizer/inline_system.py171 except Exception as exc:CODE
LOWpython/freetoken/tokenizer/effort.py196 except Exception: # noqa: BLE001 -- template rejects the probe shape, not the effortCODE
LOWpython/freetoken/tokenizer/effort.py202 except Exception: # noqa: BLE001 -- any raise means "not accepted"CODE
LOWpython/freetoken/tokenizer/effort.py225 except Exception: # noqa: BLE001 -- a rejecting template is not this dialectCODE
LOWpython/freetoken/tokenizer/effort.py249 except Exception: # noqa: BLE001 -- the encoder owns validationCODE
LOWpython/freetoken/tokenizer/effort.py256 except Exception: # noqa: BLE001CODE
LOWpython/freetoken/tokenizer/effort.py272 except Exception: # noqa: BLE001 -- can't observe the toggle; assume noneCODE
LOWpython/freetoken/tokenizer/effort.py281 except Exception: # noqa: BLE001 -- adaptive is not a state this template knowsCODE
LOWpython/freetoken/tokenizer/effort.py300 except Exception: # noqa: BLE001 -- exotic tensor comparison; treat as divergenceCODE
LOWpython/freetoken/scheduler/scheduler.py688 except Exception as e: # noqa: BLE001CODE
LOWpython/freetoken/scheduler/scheduler.py714 except Exception as e2: # noqa: BLE001 — rollback failed too; genuinely unrecoverableCODE
LOWpython/freetoken/scheduler/scheduler.py783 except Exception as e: # noqa: BLE001CODE
LOWpython/freetoken/server/anthropic_api.py176 except Exception as exc: # noqa: BLE001 — tokenizer init / other failure -> server errorCODE
LOWpython/freetoken/server/anthropic_api.py602 except Exception as exc: # noqa: BLE001 — surface as an Anthropic error eventCODE
LOW⚡python/freetoken/server/anthropic_api.py643 except Exception: # noqa: BLE001 — never let error formatting raiseCODE
LOWpython/freetoken/server/responses_api.py747 except Exception as exc: # noqa: BLE001 — never leave the client without a terminal eventCODE
LOWpython/freetoken/server/accounting.py87 except Exception as exc: # noqa: BLE001 -- preserve engine on any abort transport errorCODE
LOWpython/freetoken/server/request_logger.py114 except Exception as exc: # noqa: BLE001 — a write failure must not kill the threadCODE
LOWpython/freetoken/server/request_logger.py127 except Exception: # noqa: BLE001CODE
LOWpython/freetoken/server/request_logger.py176 except Exception as exc: # noqa: BLE001 — logging must never break servingCODE
LOWpython/freetoken/server/generation.py35except Exception: # pragma: no cover — jinja2 always ships with transformersCODE
LOWpython/freetoken/server/generation.py380 except Exception: # noqa: BLE001 -- server fault, not this request's problemCODE
LOWpython/freetoken/server/generation.py384 except Exception as exc: # noqa: BLE001 -- mirror the worker's classificationCODE
LOWpython/freetoken/server/supervisor.py70 except Exception: # noqa: BLE001 — treat an unqueryable handle as aliveCODE
LOW⚡python/freetoken/server/function_call_parser.py3680 except Exception: # noqa: BLE001 — recovery is best-effort by definitionCODE
LOWpython/freetoken/server/function_call_parser.py654 except Exception as e:CODE
LOWpython/freetoken/server/function_call_parser.py1315 except Exception as e:CODE
LOWpython/freetoken/server/openai_api.py692 except Exception: # noqa: BLE001 -- metadata only; the generation path reports real faultsCODE
LOWpython/freetoken/server/openai_api.py712 except Exception: # noqa: BLE001CODE
LOWpython/freetoken/server/api_server.py86 except Exception: # noqa: BLE001 -- already-gone / unqueryable handle: nothing to doCODE
LOWpython/freetoken/server/api_server.py113 except Exception: # noqa: BLE001 -- already-gone / unqueryable handle: nothing to doCODE
LOWpython/freetoken/server/api_server.py232 except Exception: # noqa: BLE001 -- warmup only; real faults surface on useCODE
LOWpython/freetoken/server/api_server.py569 except Exception as e: # noqa: BLE001CODE
LOWpython/freetoken/server/api_server.py727 except Exception: # noqa: BLE001 -- limits are a nicety; a bad read must not 500 the pollCODE
LOWpython/freetoken/server/api_server.py795 except Exception:CODE
LOWpython/freetoken/server/api_server.py809 except Exception:CODE
LOWpython/freetoken/server/api_server.py818 except Exception:CODE
MEDIUMpython/freetoken/server/api_server.py229def _warm() -> None:CODE
LOWpython/freetoken/server/model_meta.py129 except Exception: # noqa: BLE001 -- dummy/absent config: report "unknown", never raiseCODE
LOWpython/freetoken/server/launch.py27 except Exception: # noqa: BLE001 -- reporting is a nicety; never shadow the real exceptionCODE
LOWpython/freetoken/server/launch.py83 except Exception as exc: # noqa: BLE001 -- surface the reason, then let it propagateCODE
LOWpython/freetoken/server/launch.py104 except Exception: # noqa: BLE001 -- metadata is a nicety; readiness is notCODE
LOWpython/freetoken/server/args.py175 except Exception:CODE
LOWpython/freetoken/server/args.py226 except Exception:CODE
LOWpython/freetoken/utils/progress.py41 except Exception: # noqa: BLE001 — progress reporting must never break loadCODE
LOWpython/freetoken/utils/progress.py71 except Exception: # noqa: BLE001 — progress reporting must never break loadCODE
LOWpython/freetoken/utils/hf.py45 except Exception:CODE
LOWpython/freetoken/utils/hf.py72 except Exception:CODE
LOWpython/freetoken/utils/hf.py93 except Exception:CODE
LOWpython/freetoken/utils/hf.py126 except Exception:CODE
62 more matches not shown…
Over-Commented Block70 hits · 68 pts
SeverityFileLineSnippetContext
LOWinstall.sh1#!/usr/bin/env bashCOMMENT
LOWinstall.sh21# unset and FREETOKEN_WHEEL is local, the scriptCOMMENT
LOWinstall.sh201COMMENT
LOWpyproject.toml81# kernels in freetoken.kernel.triton (and the 'triton' attention backend). InstallCOMMENT
LOWpython/freetoken/core.py121 phase: Literal["prefill", "decode"]COMMENT
LOWpython/freetoken/core.py141 active_table_idx: "torch.Tensor | None" = NoneCOMMENT
LOWpython/freetoken/attention/fi.py81 def __init__(self, config: ModelConfig) -> None:COMMENT
LOWpython/freetoken/layers/quantization/moe/nvfp4.py81# ---------------------------------------------------------------------------COMMENT
LOWpython/freetoken/layers/quantization/moe/nvfp4.py281COMMENT
LOWpython/freetoken/scheduler/scheduler.py101 )COMMENT
LOWpython/freetoken/server/reasoning_parser.py561ATEM_MESSAGE = "<|message|>"COMMENT
LOWpython/freetoken/server/responses_api.py181COMMENT
LOWpython/freetoken/server/function_call_parser.py1# Adapted from LightLLM [https://github.com/ModelTC/lightllm/blob/main/lightllm/server/function_call_parser.py]COMMENT
LOWpython/freetoken/server/function_call_parser.py241COMMENT
LOWpython/freetoken/server/function_call_parser.py261 # bot_token is a parse trigger, not a uniqueness claim.COMMENT
LOWpython/freetoken/server/api_server.py141 ack_map: Dict[int, List[UserReply]] = field(default_factory=dict)COMMENT
LOWpython/freetoken/server/api_server.py161 # Runtime metrics for /v1/stats: throughput sliding window + last-known kv/mamba/vramCOMMENT
LOWpython/freetoken/server/api_server.py181 gpus: List[Dict[str, Any]] = field(default_factory=list)COMMENT
LOWpython/freetoken/server/args.py41 # kept out of repr: parse_args logs the whole ServerArgsCOMMENT
LOWpython/freetoken/models/config.py281 # where routed experts decode (gpu / cpu / hybrid); set by the engine from the flags, it gates which expert kernels COMMENT
LOWpython/freetoken/models/config.py341 # None for every other model.COMMENT
LOWpython/freetoken/models/deepseek_v4/model.py161 # concatenated (cu_seqlens, no padding); each request starts at its own cached_lenCOMMENT
LOWpython/freetoken/models/deepseek_v4/model.py181 def decode(COMMENT
LOWpython/freetoken/kvcache/dsv4/v4_pool.py61 # the first n_layers, so truncate to match.COMMENT
LOWpython/freetoken/engine/config.py61 # list ("3,7,11"), a count ("8" -> 8 layers evenly strided across depth), or aCOMMENT
LOWpython/freetoken/engine/engine.py1001 # Preserve the CUDA-graph batch-size set resolved at startup. The auto heuristic keysCOMMENT
LOWpython/freetoken/engine/engine.py1661 )COMMENT
LOWpython/freetoken/moe/offload_cache.py21# call still moves bytes at full PCIe rate but stalls the host, which un-hides theCOMMENT
LOWpython/freetoken/moe/offload_cache.py121 # W4A16); or "mxfp4_triton" (gpt-oss transposed split-K GEMV decode + _t groupedCOMMENT
LOWpython/freetoken/moe/offload_cache.py221 # sync); read via ``decode_miss_stats``. Graph-safe: the ``+=`` is captured into theCOMMENT
LOWpython/freetoken/moe/cpu_executor.py41# spin-wait kernel; that pinned reported utilization at 99% and laptop CPU/GPU dynamicCOMMENT
LOW…thon/freetoken/kernel/csrc/row_store/row_store_ext.cpp1// Disk-backed row store: fixed-width rows read straight from checkpoint shard tensorsCOMMENT
LOW…thon/freetoken/kernel/csrc/row_store/row_store_ext.cpp21#include <mutex>COMMENT
LOWpython/freetoken/kernel/csrc/include/freetoken/utils.h1#pragma onceCOMMENT
LOWpython/freetoken/kernel/csrc/include/freetoken/utils.h21COMMENT
LOW…n/freetoken/kernel/csrc/include/freetoken/hip_compat.h1#pragma onceCOMMENT
LOW…n/freetoken/kernel/csrc/include/freetoken/hip_compat.h21COMMENT
LOW…n/freetoken/kernel/csrc/include/freetoken/hip_compat.h41#endifCOMMENT
LOW…n/freetoken/kernel/csrc/include/freetoken/hip_compat.h61#endifCOMMENT
LOW…n/freetoken/kernel/csrc/include/freetoken/hip_compat.h81#endifCOMMENT
LOW…n/freetoken/kernel/csrc/include/freetoken/hip_compat.h101// TODO(ROCm): re-enable proper UVA query if HIP adds this attribute.COMMENT
LOW…n/freetoken/kernel/csrc/include/freetoken/hip_compat.h121COMMENT
LOW…n/freetoken/kernel/csrc/include/freetoken/hip_compat.h141#define cudaLaunchHostFunc hipLaunchHostFuncCOMMENT
LOWpython/freetoken/kernel/csrc/include/freetoken/tensor.h1#pragma onceCOMMENT
LOW…thon/freetoken/kernel/csrc/include/freetoken/nccl227.h1/*************************************************************************COMMENT
LOWpython/freetoken/kernel/csrc/gguf/ggml-common.h1// adapted fromCOMMENT
LOWpython/freetoken/kernel/csrc/gguf/dispatch.h1// Minimal AT_DISPATCH helper for the vendored GGUF kernels (borrowed fromCOMMENT
LOWpython/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp1// CPU-compute MoE executor for the "cpu" offload backend.COMMENT
LOWpython/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp21#include <cmath>COMMENT
LOWpython/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp461#if (defined(__GNUC__) && __GNUC__ >= 10) || defined(__clang__)COMMENT
LOWpython/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp761COMMENT
LOWpython/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp1101// Bandwidth notes (Sapphire Rapids 8480+, 13 cores): the two passes already readCOMMENT
LOWpython/freetoken/kernel/triton/fp8_pertensor_linear.py221 a, weight, weight_scale, out, M, N, K,COMMENT
LOWpython/freetoken/kernel/triton/causal_conv1d_triton.py41COMMENT
LOWpython/freetoken/kernel/triton/nvfp4_linear.py361# [BLOCK_N, BLOCK_KW] words (coalesced along N in the K-major layout), dequanted inCOMMENT
LOWpython/freetoken/kernel/fla/solve_tril.py1# Vendored from vLLM's third_party/flash_linear_attention (PR #53906, commit 933876c3),COMMENT
LOWpython/freetoken/kernel/fla/kda.py1# SPDX-License-Identifier: Apache-2.0COMMENT
LOWpython/freetoken/kernel/fla/kda_chunk_delta_h.py1# Vendored from vLLM's third_party/flash_linear_attention (PR #53906, commit 933876c3),COMMENT
LOWpython/freetoken/kernel/fla/layernorm_gated.py1# Adapt from https://github.com/fla-org/flash-linear-attention/blob/main/fla/modules/layernorm_gated.pyCOMMENT
LOWpython/freetoken/kernel/fla/chunk_delta_h.py21COMMENT
10 more matches not shown…
Cross-File Repetition12 hits · 60 pts
SeverityFileLineSnippetContext
HIGHpython/freetoken/models/minimax_m3/config.py0none when the config carries no vision section, which is how a text-only engine asks for no tower.STRING
HIGHpython/freetoken/models/glm5_next/config.py0none when the config carries no vision section, which is how a text-only engine asks for no tower.STRING
HIGHpython/freetoken/models/muse_glimmer/config.py0none when the config carries no vision section, which is how a text-only engine asks for no tower.STRING
HIGHpython/freetoken/models/minimax_m3/vision.py0kept as a real conv3d (kernel == stride): an equivalent unfolded matmul rounds differently.STRING
HIGHpython/freetoken/models/glm5_next/vision.py0kept as a real conv3d (kernel == stride): an equivalent unfolded matmul rounds differently.STRING
HIGHpython/freetoken/models/qwen3_vl/vision.py0kept as a real conv3d (kernel == stride): an equivalent unfolded matmul rounds differently.STRING
HIGHpython/freetoken/models/minimax_m3/weight.py0the vision tower alone, named as iter_weights names it.STRING
HIGHpython/freetoken/models/glm5_next/weight.py0the vision tower alone, named as iter_weights names it.STRING
HIGHpython/freetoken/models/qwen3_5_moe/weight.py0the vision tower alone, named as iter_weights names it.STRING
HIGHpython/freetoken/models/muse_glimmer/weight.py0the vision tower alone, named as iter_weights names it.STRING
HIGHpython/freetoken/models/qwen4_exp/weight.py0the vision tower alone, named as iter_weights names it.STRING
HIGHpython/freetoken/models/qwen3_vl/weight.py0the vision tower alone, named as iter_weights names it.STRING
Hallucination Indicators2 hits · 20 pts
SeverityFileLineSnippetContext
CRITICALpython/freetoken/kernel/fla/utils.py232 return triton.runtime.driver.active.utils.get_device_properties(tensor_idx)[CODE
CRITICALpython/freetoken/kernel/fla/utils.py301 triton.runtime.driver.active.utils.get_device_properties(i)[CODE
AI Structural Patterns18 hits · 18 pts
SeverityFileLineSnippetContext
LOWpython/freetoken/layers/moe.py456CODE
LOWpython/freetoken/layers/moe.py39CODE
LOWpython/freetoken/layers/moe.py149CODE
LOWpython/freetoken/daemon/proxy.py42CODE
LOWpython/freetoken/daemon/serve_manager.py166CODE
LOWpython/freetoken/moe/benchbw.py693CODE
LOWpython/freetoken/moe/expert_banks.py282CODE
LOWpython/freetoken/kernel/utils.py352CODE
LOWpython/freetoken/kernel/triton/sampling.py636CODE
LOWpython/freetoken/kernel/fla/kda.py39CODE
LOWpython/freetoken/kernel/fla/kda.py145CODE
LOWpython/freetoken/kernel/fla/kda.py954CODE
LOWpython/freetoken/kernel/fla/kda.py1215CODE
LOWpython/freetoken/kernel/fla/kda_chunk_delta_h.py332CODE
LOW…freetoken/kernel/fla/fused_sigmoid_gating_recurrent.py247CODE
LOWpython/freetoken/kernel/fla/fused_recurrent.py556CODE
LOWtests/models/qwen4_exp/common.py24CODE
LOWtests/daemon/test_daemon_serve_manager.py86CODE
Modern AI Meta-Vocabulary6 hits · 17 pts
SeverityFileLineSnippetContext
MEDIUMpython/freetoken/attention/fa.py167 window_size: Tuple[int, int] = (-1, -1), # -1 means infinite context windowCODE
MEDIUMpython/freetoken/server/responses_api.py740 # codex reads this code to tell a blown context window from a generic failure.COMMENT
MEDIUMpython/freetoken/server/generation.py397 # </think>. Mirror that default here, else the chain-of-thought leaks into content.COMMENT
MEDIUMpython/freetoken/server/model_meta.py58 # model card recommends it for agentic use) rather than the OpenAI triple.COMMENT
MEDIUMpython/freetoken/moe/benchbw.py605# ================================ orchestration ================================COMMENT
MEDIUMbenchmarks/bench_load_weight_generic.py238# ---------------- parent orchestration ----------------COMMENT
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHpython/freetoken/kvcache/base.py260 Evict some prefixes from the cache to free up space. This operation will modify the cache. NoteSTRING
HIGHpython/freetoken/kernel/fla/chunk.py141 Args: q (torch.Tensor): queries of shape `[B, T, H, K]` if `head_first=False` else `[B, H, T, KSTRING
HIGHpython/freetoken/kernel/fla/fused_recurrent.py570 Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): STRING
Cross-Language Confusion4 hits · 12 pts
SeverityFileLineSnippetContext
HIGHpython/freetoken/cache_report.py21 """Read an int out of a server document defensively: a missing key, a null, and a 0 allSTRING
HIGHpython/freetoken/attention/fa.py178 "If you're sure it's correctly installed, try `apt update && apt install libnuma1`."CODE
HIGHpython/freetoken/models/gemma4/model.py29 per-layer ``layer_scalar``. The feed-forward is the dual (shared MLP || routed MoE)STRING
HIGHpython/freetoken/moe/cpu_executor.py633 is still pending (ready==1 && done==0), it was already pending when firstSTRING
Self-Referential Comments4 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMpython/freetoken/kernel/fla/solve_tril.py9# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUMpython/freetoken/kernel/fla/kda.py5# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUMpython/freetoken/kernel/fla/kda_chunk_delta_h.py13# This file contains code copied from the flash-linear-attention project.COMMENT
MEDIUMpython/freetoken/kernel/fla/fused_recurrent.py9# This file contains code copied from the flash-linear-attention project.COMMENT
Verbosity Indicators7 hits · 8 pts
SeverityFileLineSnippetContext
LOWpython/freetoken/kernel/fla/chunk_fwd.py124 # Step 1: compute all 10 lower-triangular [BC, BC] blocks of K @ K^TCOMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py183 # Step 2: apply gate and beta scalingCOMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py228 # Step 3: forward substitution on diagonal blocks -> (I + A_diag)^{-1}COMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py267 # Step 4: block merge -> full (I + A)^{-1}COMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py307 # Step 5: store full (I + A)^{-1} to output ACOMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py389 # Step 1: fused kkt + solve_trilSTRING
LOWpython/freetoken/kernel/fla/chunk_fwd.py406 # Step 2: recompute_w_uSTRING
Structural Annotation Overuse7 hits · 8 pts
SeverityFileLineSnippetContext
LOWpython/freetoken/kernel/fla/chunk_fwd.py124 # Step 1: compute all 10 lower-triangular [BC, BC] blocks of K @ K^TCOMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py183 # Step 2: apply gate and beta scalingCOMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py228 # Step 3: forward substitution on diagonal blocks -> (I + A_diag)^{-1}COMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py267 # Step 4: block merge -> full (I + A)^{-1}COMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py307 # Step 5: store full (I + A)^{-1} to output ACOMMENT
LOWpython/freetoken/kernel/fla/chunk_fwd.py389 # Step 1: fused kkt + solve_trilSTRING
LOWpython/freetoken/kernel/fla/chunk_fwd.py406 # Step 2: recompute_w_uSTRING
Dead Code4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMtests/server/test_responses_api.py646CODE
MEDIUMtests/server/test_responses_api.py678CODE
MEDIUMtests/server/test_responses_api.py755CODE
MEDIUMtests/server/test_anthropic_api.py588CODE
AI Slop Vocabulary2 hits · 5 pts
SeverityFileLineSnippetContext
MEDIUMpython/freetoken/kvcache/linear_state_pool.py94 # flows between them by demand. Unused by the op harness (which assigns slots by hand).COMMENT
MEDIUMtests/models/test_glm5_next_kda_snapshot.py21from tests.models.test_glm5_next_kda_op import ( # reuse the op harnessCODE
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWpython/freetoken/server/function_call_parser.py981 # Check if buffer contains complete end token (without leading newline)COMMENT
LOWpython/freetoken/server/function_call_parser.py988 # Check if buffer might contain partial end token at the endCOMMENT
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippetContext
LOWscripts/publish-wheels.sh5# Usage:COMMENT
LOWscripts/ci/fetch-nightly-pair.sh5# Usage:COMMENT