Repository Analysis

FlashML-org/FreeToken

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

24.7 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of FlashML-org/FreeToken, a Python project with 11,099 GitHub stars. SynthScan v2.0 examined 124,617 lines of code across 530 source files, recording 2543 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 24.7 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

24.7
Adjusted Score
24.7
Raw Score
100%
Time Factor
2026-09-02
Last Push
11.1K
Stars
Python
Language
124.6K
Lines of Code
530
Files
2.5K
Pattern Hits
2026-09-02
Scan Date
0.03
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

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

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 2HIGH 16MEDIUM 209LOW 2316

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 2543 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers1065 hits · 1063 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.py321def _remove_toml_root_string_value(text: str, key: str, value: str) -> str:CODE
LOWpython/freetoken/launch.py342def _codex_migrated_base_config_text(existing: str) -> str:CODE
LOWpython/freetoken/launch.py533def _openclaw_has_freetoken_provider(config: dict[str, object]) -> bool:CODE
LOWpython/freetoken/launch.py543def _confirm_openclaw_first_patch(ctx: LaunchContext, config_path: Path) -> bool:CODE
LOWpython/freetoken/launch.py609def _clear_openclaw_session_overrides(primary_model: str) -> None:CODE
LOWpython/freetoken/benchmark/perf.py54def compare_memory_kernel_perf(CODE
LOWpython/freetoken/benchmark/client.py313def process_benchmark_results(raw_data: List[RawResult], tokenizer: Any) -> BenchmarkResult: ...CODE
LOWpython/freetoken/benchmark/client.py317def process_benchmark_results(raw_data: List[RawResult]) -> None: ...CODE
LOWpython/freetoken/benchmark/client.py320def process_benchmark_results(CODE
LOWpython/freetoken/attention/__init__.py145def create_qsa_sparse_backend(config: ModelConfig):CODE
LOWpython/freetoken/attention/fi.py147 def _initialize_metadata_once(self, metadata: FIMetadata) -> None: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.py178 def maybe_free_swa_out_of_window(self, reqs: List[Req], *, forward_iter: int) -> None:CODE
LOWpython/freetoken/scheduler/cache.py217 def free_swa_out_of_window_extend(self, reqs: List[Req]) -> None:CODE
LOWpython/freetoken/scheduler/scheduler.py843 def _report_prompt_admissions(self, batch: Batch) -> None:CODE
LOWpython/freetoken/server/anthropic_api.py77def register_anthropic_routes(CODE
LOWpython/freetoken/server/anthropic_api.py109async def handle_anthropic_messages(CODE
LOWpython/freetoken/server/anthropic_api.py142async def handle_anthropic_count_tokens(req: AnthropicCountTokensRequest, state: Any):CODE
LOWpython/freetoken/server/anthropic_api.py302def convert_anthropic_to_genspec(CODE
LOWpython/freetoken/server/anthropic_api.py603def _validation_error_message(exc: RequestValidationError) -> str:CODE
LOWpython/freetoken/server/anthropic_api.py614def _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.py186def convert_responses_to_genspec(CODE
LOWpython/freetoken/server/responses_api.py470async 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
LOWpython/freetoken/server/function_call_parser.py3665 def parse_streaming_increment(self, new_text: str) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py3674 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.py434 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py709 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py968 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py1331 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py1677 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py1984 def _build_partial_arguments_json(self, func_name: str, partial_body: str, tools: List[Tool]) -> Optional[str]:CODE
LOWpython/freetoken/server/function_call_parser.py2096 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py2777 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py2955 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/function_call_parser.py3187 def _finalize_truncated_invoke(self, reason: str = "tool channel closed") -> List[ToolCallItem]:CODE
LOWpython/freetoken/server/function_call_parser.py3298 def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult:CODE
LOWpython/freetoken/server/openai_api.py231async def stream_chat_completion_chunks(CODE
LOWpython/freetoken/server/openai_api.py622def _response_format_unsupported(response_format: dict[str, Any] | None) -> bool:CODE
LOWpython/freetoken/server/openai_api.py627def _completion_unsupported_reason(req: CompletionRequest) -> str | None:CODE
LOWpython/freetoken/server/api_server.py68def _terminate_backend_workers(processes: List[Any]) -> None:CODE
LOWpython/freetoken/server/api_server.py87def _exit_after_backend_death(grace_s: float) -> threading.Timer:CODE
LOWpython/freetoken/server/api_server.py447async def _record_request_middleware(request: Request, call_next):CODE
LOWpython/freetoken/server/api_server.py848def _install_shell_stop_handlers() -> None:CODE
LOWpython/freetoken/server/args.py68 def backend_create_detokenizer_link(self) -> bool:CODE
LOWpython/freetoken/server/args.py72 def frontend_create_tokenizer_link(self) -> bool:CODE
1005 more matches not shown…
Unused Imports681 hits · 666 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/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.py24CODE
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__.py8CODE
LOWpython/freetoken/layers/__init__.py8CODE
LOWpython/freetoken/layers/__init__.py8CODE
LOWpython/freetoken/layers/__init__.py9CODE
LOWpython/freetoken/layers/__init__.py9CODE
621 more matches not shown…
Decorative Section Separators188 hits · 639 pts
SeverityFileLineSnippetContext
MEDIUMpython/freetoken/layers/moe.py280 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/moe.py286 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/moe.py425 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/layers/moe.py429 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/server/function_call_parser.py3156 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/server/function_call_parser.py3158 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/server/function_call_parser.py3471 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/server/function_call_parser.py3473 # ------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/loader.py136# ---------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/loader.py142# ---------------------------------------------------------------------------------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.py295# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen3_5_moe/weight.py297# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen3_5_moe/weight.py534# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen3_5_moe/weight.py536# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen3_5_moe/weight.py690# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen3_5_moe/weight.py692# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/deepseek_v4/weight.py166# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/deepseek_v4/weight.py168# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/glm4_moe/weight.py41# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/glm4_moe/weight.py43# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/glm4_moe/weight.py191# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/glm4_moe/weight.py193# --------------------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/models/qwen4_exp/weight.py187# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen4_exp/weight.py189# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen4_exp/weight.py287# ======================================================================================COMMENT
MEDIUMpython/freetoken/models/qwen4_exp/weight.py289# ======================================================================================COMMENT
MEDIUMpython/freetoken/moe/nvfp4_backends.py61# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/moe/nvfp4_backends.py63# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/moe/nvfp4_backends.py275# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/moe/nvfp4_backends.py278# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/moe/nvfp4_backends.py450# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/moe/nvfp4_backends.py452# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/moe/nvfp4_backends.py502# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/moe/nvfp4_backends.py520# ---------------------------------------------------------------------------COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_blockscale_moe.py126# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_blockscale_moe.py130# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/mxfp8_linear.py268# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/mxfp8_linear.py271# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py105# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py107# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py183# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py186# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py240# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py255# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py369# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_pertensor_linear.py371# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py35# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py37# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py85# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py87# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py158# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py162# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py274# ======================================================================================COMMENT
MEDIUMpython/freetoken/kernel/triton/fp8_block_linear.py276# ======================================================================================COMMENT
128 more matches not shown…
Modern Structural Boilerplate245 hits · 244 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.py465def _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__.py189__all__ = [CODE
LOWpython/freetoken/attention/qsa_sparse.py318 def _update_index_cache(self, index, md: QSASparseMetadata, slot: int) -> None:CODE
LOWpython/freetoken/attention/qsa_sparse.py507__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/dsv4_indexer.py87__all__ = ["IndexerBackendMixin"]CODE
LOWpython/freetoken/llm/__init__.py3__all__ = ["LLM"]CODE
LOWpython/freetoken/checkpoint/ftw.py636__all__ = [CODE
LOWpython/freetoken/checkpoint/convert.py304__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.py143__all__ = [CODE
LOWpython/freetoken/layers/__init__.py27__all__ = [CODE
LOWpython/freetoken/layers/activation.py68__all__ = [CODE
LOWpython/freetoken/layers/rotary.py234__all__ = ["get_rope", "RotaryEmbedding", "set_rope_device"]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__.py82__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/message/__init__.py22__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.py726 def _update_prev() -> None:CODE
LOWpython/freetoken/server/function_call_parser.py1351 def _update_prev() -> None:CODE
LOWpython/freetoken/server/function_call_parser.py1701 def _update_prev_args() -> None:CODE
LOWpython/freetoken/server/function_call_parser.py2119 def _update_prev() -> None:CODE
LOWpython/freetoken/utils/__init__.py29__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/quant_linear.py73__all__ = [CODE
LOWpython/freetoken/models/register.py167__all__ = ["ModelSpec", "get_model_spec", "get_model_class"]CODE
LOWpython/freetoken/models/__init__.py21__all__ = [CODE
LOWpython/freetoken/models/weight.py406__all__ = [CODE
LOWpython/freetoken/models/loader.py432__all__ = [CODE
LOWpython/freetoken/models/nvfp4_banks.py339__all__ = [CODE
LOWpython/freetoken/models/blocks.py63__all__ = ["BaseLLMModel", "GatedMLP"]CODE
LOWpython/freetoken/models/gpt_oss/attention.py93__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", "setup_offload_expert_banks"]CODE
LOWpython/freetoken/models/gpt_oss/weight.py607__all__ = [CODE
LOWpython/freetoken/models/gpt_oss/model.py95__all__ = ["GptOssDecoderLayer", "GptOssForCausalLM", "GptOssModel"]CODE
LOWpython/freetoken/models/gpt_oss/moe.py227__all__ = [CODE
LOWpython/freetoken/models/minimax_m3/attention.py122__all__ = ["MiniMaxM3Attention"]CODE
LOWpython/freetoken/models/minimax_m3/config.py201__all__ = ["parse_config"]CODE
LOWpython/freetoken/models/minimax_m3/__init__.py9__all__ = [CODE
LOWpython/freetoken/models/minimax_m3/weight.py283__all__ = ["iter_weights", "load_nvfp4_expert_sources", "load_nvfp4_expert_sources_parallel"]CODE
LOWpython/freetoken/models/minimax_m3/mlp.py62__all__ = ["MiniMaxM3MLP", "make_proj"]CODE
LOWpython/freetoken/models/minimax_m3/model.py100__all__ = ["MiniMaxM3ForCausalLM"]CODE
185 more matches not shown…
Excessive Try-Catch Wrapping115 hits · 123 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.py282 except Exception:CODE
LOWpython/freetoken/tokenizer/server.py99 except Exception as exc: # noqa: BLE001 — isolate, never crash the workerCODE
LOWpython/freetoken/tokenizer/effort.py188 except Exception: # noqa: BLE001 -- template rejects the probe shape, not the effortCODE
LOWpython/freetoken/tokenizer/effort.py194 except Exception: # noqa: BLE001 -- any raise means "not accepted"CODE
LOWpython/freetoken/tokenizer/effort.py213 except Exception: # noqa: BLE001 -- a rejecting template is not this dialectCODE
LOWpython/freetoken/tokenizer/effort.py243 except Exception: # noqa: BLE001 -- can't observe the toggle; assume noneCODE
LOWpython/freetoken/tokenizer/effort.py252 except Exception: # noqa: BLE001 -- adaptive is not a state this template knowsCODE
LOWpython/freetoken/tokenizer/effort.py271 except Exception: # noqa: BLE001 -- exotic tensor comparison; treat as divergenceCODE
LOWpython/freetoken/scheduler/scheduler.py657 except Exception as e: # noqa: BLE001CODE
LOWpython/freetoken/scheduler/scheduler.py683 except Exception as e2: # noqa: BLE001 — rollback failed too; genuinely unrecoverableCODE
LOWpython/freetoken/scheduler/scheduler.py759 except Exception as e: # noqa: BLE001CODE
LOWpython/freetoken/server/anthropic_api.py168 except Exception as exc: # noqa: BLE001 — tokenizer init / other failure -> server errorCODE
LOWpython/freetoken/server/anthropic_api.py569 except Exception as exc: # noqa: BLE001 — surface as an Anthropic error eventCODE
LOWpython/freetoken/server/anthropic_api.py610 except Exception: # noqa: BLE001 — never let error formatting raiseCODE
LOWpython/freetoken/server/responses_api.py721 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.py33except Exception: # pragma: no cover — jinja2 always ships with transformersCODE
LOWpython/freetoken/server/generation.py331 except Exception: # noqa: BLE001 -- server fault, not this request's problemCODE
LOWpython/freetoken/server/generation.py335 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
LOWpython/freetoken/server/function_call_parser.py3659 except Exception: # noqa: BLE001 — recovery is best-effort by definitionCODE
LOWpython/freetoken/server/function_call_parser.py652 except Exception as e:CODE
LOWpython/freetoken/server/function_call_parser.py1313 except Exception as e:CODE
LOWpython/freetoken/server/openai_api.py664 except Exception: # noqa: BLE001 -- metadata only; the generation path reports real faultsCODE
LOWpython/freetoken/server/openai_api.py684 except Exception: # noqa: BLE001CODE
LOWpython/freetoken/server/api_server.py83 except Exception: # noqa: BLE001 -- already-gone / unqueryable handle: nothing to doCODE
LOWpython/freetoken/server/api_server.py110 except Exception: # noqa: BLE001 -- already-gone / unqueryable handle: nothing to doCODE
LOWpython/freetoken/server/api_server.py226 except Exception: # noqa: BLE001 -- warmup only; real faults surface on useCODE
LOWpython/freetoken/server/api_server.py530 except Exception as e: # noqa: BLE001CODE
LOWpython/freetoken/server/api_server.py680 except Exception: # noqa: BLE001 -- limits are a nicety; a bad read must not 500 the pollCODE
LOWpython/freetoken/server/api_server.py748 except Exception:CODE
LOWpython/freetoken/server/api_server.py762 except Exception:CODE
LOWpython/freetoken/server/api_server.py771 except Exception:CODE
MEDIUMpython/freetoken/server/api_server.py223def _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.py126 except Exception:CODE
LOWpython/freetoken/server/args.py175 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
LOWpython/freetoken/utils/hf.py218 except Exception as e:CODE
LOWpython/freetoken/utils/hf.py236 except Exception as e:CODE
LOWpython/freetoken/models/weight.py204 except Exception: # heuristic only -> default to serial; the real loader reports errorsCODE
LOWpython/freetoken/models/loader.py199 except Exception: # noqa: BLE001 -- best-effort handle cleanupCODE
LOWpython/freetoken/models/minimax_m3/weight.py94 except Exception: # pragma: no cover - best effortCODE
LOWpython/freetoken/models/qwen3_5_moe/weight.py829 except Exception:CODE
LOWpython/freetoken/models/deepseek_v4/weight.py51 except Exception:CODE
55 more matches not shown…
Deep Nesting124 hits · 112 pts
SeverityFileLineSnippetContext
LOWpython/freetoken/gpu_select.py71CODE
LOWpython/freetoken/gpu_select.py127CODE
LOWpython/freetoken/control_cli.py412CODE
LOWpython/freetoken/benchmark/perf.py10CODE
LOWpython/freetoken/checkpoint/ftw.py415CODE
LOWpython/freetoken/checkpoint/ftw.py256CODE
LOWpython/freetoken/checkpoint/convert.py163CODE
LOWpython/freetoken/shell/tui.py531CODE
LOWpython/freetoken/shell/tui.py609CODE
LOWpython/freetoken/tokenizer/server.py128CODE
LOWpython/freetoken/scheduler/cache.py615CODE
LOWpython/freetoken/scheduler/scheduler.py302CODE
LOWpython/freetoken/scheduler/scheduler.py477CODE
LOWpython/freetoken/server/anthropic_api.py178CODE
LOWpython/freetoken/server/anthropic_api.py398CODE
LOWpython/freetoken/server/reasoning_parser.py348CODE
LOWpython/freetoken/server/reasoning_parser.py726CODE
LOWpython/freetoken/server/responses_api.py186CODE
LOWpython/freetoken/server/responses_api.py470CODE
LOWpython/freetoken/server/generation.py197CODE
LOWpython/freetoken/server/generation.py340CODE
LOWpython/freetoken/server/generation.py546CODE
LOWpython/freetoken/server/generation.py605CODE
LOWpython/freetoken/server/supervisor.py99CODE
LOWpython/freetoken/server/function_call_parser.py180CODE
LOWpython/freetoken/server/function_call_parser.py350CODE
LOWpython/freetoken/server/function_call_parser.py361CODE
LOWpython/freetoken/server/function_call_parser.py434CODE
LOWpython/freetoken/server/function_call_parser.py709CODE
LOWpython/freetoken/server/function_call_parser.py1067CODE
LOWpython/freetoken/server/function_call_parser.py1331CODE
LOWpython/freetoken/server/function_call_parser.py1677CODE
LOWpython/freetoken/server/function_call_parser.py2096CODE
LOWpython/freetoken/server/function_call_parser.py2524CODE
LOWpython/freetoken/server/function_call_parser.py2562CODE
LOWpython/freetoken/server/function_call_parser.py2777CODE
LOWpython/freetoken/server/function_call_parser.py2955CODE
LOWpython/freetoken/server/function_call_parser.py3298CODE
LOWpython/freetoken/server/openai_api.py231CODE
LOWpython/freetoken/models/config.py433CODE
LOWpython/freetoken/models/weight.py71CODE
LOWpython/freetoken/models/weight.py169CODE
LOWpython/freetoken/models/weight.py119CODE
LOWpython/freetoken/models/loader.py214CODE
LOWpython/freetoken/models/loader.py239CODE
LOWpython/freetoken/models/loader.py159CODE
LOWpython/freetoken/models/nvfp4_banks.py81CODE
LOWpython/freetoken/models/nvfp4_banks.py220CODE
LOWpython/freetoken/models/nvfp4_banks.py162CODE
LOWpython/freetoken/models/nvfp4_banks.py287CODE
LOWpython/freetoken/models/gpt_oss/weight.py205CODE
LOWpython/freetoken/models/gpt_oss/weight.py355CODE
LOWpython/freetoken/models/gpt_oss/weight.py215CODE
LOWpython/freetoken/models/gpt_oss/weight.py426CODE
LOWpython/freetoken/models/minimax_m3/weight.py147CODE
LOWpython/freetoken/models/minimax_m2/weight.py45CODE
LOWpython/freetoken/models/minimax_m2/weight.py60CODE
LOWpython/freetoken/models/gemma4/gguf.py187CODE
LOWpython/freetoken/models/gemma4/weight.py126CODE
LOWpython/freetoken/models/glm5_next/weight.py180CODE
64 more matches not shown…
Over-Commented Block60 hits · 58 pts
SeverityFileLineSnippetContext
LOWinstall.sh1#!/usr/bin/env bashCOMMENT
LOWinstall.sh201# re-install can't inherit a stale/mismatched torch (e.g. an old cu128 venv after a cu130 bump).COMMENT
LOWpython/freetoken/core.py121 # decode to gather/scatter recurrent+conv state without host-side loops (so theCOMMENT
LOWpython/freetoken/attention/fi.py81 def __init__(self, config: ModelConfig) -> None:COMMENT
LOWpython/freetoken/scheduler/cache.py281 self.swa_pool.alloc_swa(allocated)COMMENT
LOWpython/freetoken/scheduler/scheduler.py661 logger.error(f"cache rebuild failed before teardown: {e!r} — old cache intact")COMMENT
LOWpython/freetoken/server/reasoning_parser.py561ATEM_MESSAGE = "<|message|>"COMMENT
LOWpython/freetoken/server/responses_api.py181# --------------------------------------------------------------------------- #COMMENT
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.py241 """Base class providing two sets of interfaces: one-time and streaming incremental."""COMMENT
LOWpython/freetoken/server/function_call_parser.py261COMMENT
LOWpython/freetoken/server/function_call_parser.py3421 # more blocks may still precede the boundary -- a second invoke blockCOMMENT
LOWpython/freetoken/server/api_server.py141 # /health state (loading/ok/error) and /v1/stats can identify the same engine generation.COMMENT
LOWpython/freetoken/server/api_server.py161 # Optional backend metadata delivered once on the ack path at ready: per-unit cache VRAMCOMMENT
LOWpython/freetoken/server/api_server.py181 # handler) tears these down itself, AFTER setting _SHUTTING_DOWN, so the supervisor observesCOMMENT
LOWpython/freetoken/server/api_server.py781 # pool without having to know how the server was started.COMMENT
LOWpython/freetoken/server/args.py21 # The workers read it to leave the shell's foreground process group, so the ^C that cancelsCOMMENT
LOWpython/freetoken/models/config.py261 nvfp4_backend: str = "triton"COMMENT
LOWpython/freetoken/models/config.py321 # GLM-5.3-Flash (glm5_next) payload (Glm5NextArgs): NoPE-MLA dims, the kpool indexerCOMMENT
LOWpython/freetoken/models/register.py61 # Qwen3.8-Flash-Next (model_type qwen4_exp): multimodal wrapper config (text tower inCOMMENT
LOWpython/freetoken/models/deepseek_v4/model.py181 return F.linear(h[0, last_indices], self.head) # [B, vocab]COMMENT
LOWpython/freetoken/engine/config.py41 # (cudaMemcpyBatchAsync); no-op unless moe_cache_size > 2 * num_experts.COMMENT
LOWpython/freetoken/engine/config.py61 page_size: int = 1COMMENT
LOWpython/freetoken/engine/engine.py1061 # DSV4's KV page IS the P-token window page (window == radix reuse granularity == lcm ofCOMMENT
LOWpython/freetoken/engine/engine.py1361 raise ValueError(COMMENT
LOWpython/freetoken/engine/engine.py1421 # args.py's "no sizing flag -> default --moe-cache-auto" only fires when theCOMMENT
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 # prefill). The format names its bank layout (_BANK_SCHEMAS) and which kernelsCOMMENT
LOWpython/freetoken/moe/offload_cache.py201 # set_bank_sources). The GPU slot cache stays one unified pool per bank.COMMENT
LOWpython/freetoken/moe/nvfp4_backends.py501COMMENT
LOWpython/freetoken/moe/cpu_executor.py41# spin-wait kernel; that pinned reported utilization at 99% and laptop CPU/GPU dynamicCOMMENT
LOWpython/freetoken/kernel/csrc/include/freetoken/utils.h1#pragma onceCOMMENT
LOWpython/freetoken/kernel/csrc/include/freetoken/utils.h21COMMENT
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
LOW…thon/freetoken/kernel/csrc/ple_store/ple_store_ext.cpp1// Disk-backed PLE row store: rows read straight from the checkpoint's fp8 shard tensorsCOMMENT
LOW…thon/freetoken/kernel/csrc/ple_store/ple_store_ext.cpp21#include <vector>COMMENT
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// distance otherwise prefetches another worker's tile: duplicated DRAM traffic thatCOMMENT
LOWpython/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp561 s += (e4m3[scale[b]] * asb[b]) * (float)isum;COMMENT
LOWpython/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp761 if (cpu_has_avxvnni()) return dot_nvfp4_i8_vnni;COMMENT
LOWpython/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp1081 int layer_id;COMMENT
LOWpython/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp1101// Helps locality+bytes when bs is large; decode batches here are tiny (<=4).COMMENT
LOWpython/freetoken/kernel/triton/fp8_pertensor_linear.py241# Batched decode (M > 1) W8A8: quantize the activation with the checkpoint's staticCOMMENT
LOWpython/freetoken/kernel/triton/causal_conv1d_triton.py41COMMENT
LOWpython/freetoken/kernel/triton/nvfp4_linear.py361 return outCOMMENT
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
LOWpython/freetoken/kernel/fla/fused_recurrent.py1# Vendored from vLLM's third_party/flash_linear_attention (PR #53906, commit 933876c3),COMMENT
LOWscripts/build-release-wheels.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/publish-wheels.sh1#!/usr/bin/env bashCOMMENT
LOWscripts/ci/manylinux-build.sh1#!/usr/bin/env bashCOMMENT
LOW.github/workflows/release.yml1# Tagged-release wheels: build the cp310-cp313 runtime matrix + the kernel-cacheCOMMENT
LOW.github/workflows/nightly-wheels.yml1# Nightly engine wheels: build on the self-hosted EC2 node and publish to theCOMMENT
Cross-File Repetition9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHpython/freetoken/models/minimax_m3/weight.py0cpu nvfp4 expert source banks for the offload cache; see load_nvfp4_expert_source_banks.STRING
HIGHpython/freetoken/models/minimax_m2/weight.py0cpu nvfp4 expert source banks for the offload cache; see load_nvfp4_expert_source_banks.STRING
HIGHpython/freetoken/models/gemma4/weight.py0cpu nvfp4 expert source banks for the offload cache; see load_nvfp4_expert_source_banks.STRING
HIGHpython/freetoken/models/minimax_m3/weight.py0parallel: same nvfp4 source banks via the common chunked multi-threaded reader.STRING
HIGHpython/freetoken/models/minimax_m2/weight.py0parallel: same nvfp4 source banks via the common chunked multi-threaded reader.STRING
HIGHpython/freetoken/models/glm4_moe/weight.py0parallel: same nvfp4 source banks via the common chunked multi-threaded reader.STRING
HIGHpython/freetoken/models/gemma4/weight.py0parallel: same nvfp4 source banks via the common chunked multi-threaded reader.STRING
HIGHpython/freetoken/models/qwen3_5_moe/weight.py0parallel: same nvfp4 source banks via the common chunked multi-threaded reader.STRING
HIGHpython/freetoken/models/qwen4_exp/weight.py0parallel: same nvfp4 source banks via the common chunked multi-threaded reader.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
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.py714 # codex reads this code to tell a blown context window from a generic failure.COMMENT
MEDIUMpython/freetoken/server/generation.py348 # </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.py603# ================================ orchestration ================================COMMENT
MEDIUMbenchmarks/bench_load_weight_generic.py238# ---------------- parent orchestration ----------------COMMENT
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHpython/freetoken/kvcache/base.py243 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
AI Structural Patterns14 hits · 14 pts
SeverityFileLineSnippetContext
LOWpython/freetoken/layers/moe.py587CODE
LOWpython/freetoken/daemon/serve_manager.py156CODE
LOWpython/freetoken/moe/benchbw.py691CODE
LOWpython/freetoken/kernel/utils.py232CODE
LOWpython/freetoken/kernel/triton/sampling.py598CODE
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.py78CODE
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.py28 per-layer ``layer_scalar``. The feed-forward is the dual (shared MLP || routed MoE)STRING
HIGHpython/freetoken/moe/cpu_executor.py607 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.py618CODE
MEDIUMtests/server/test_responses_api.py650CODE
MEDIUMtests/server/test_responses_api.py727CODE
MEDIUMtests/server/test_anthropic_api.py528CODE
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.py979 # Check if buffer contains complete end token (without leading newline)COMMENT
LOWpython/freetoken/server/function_call_parser.py986 # Check if buffer might contain partial end token at the endCOMMENT
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWscripts/publish-wheels.sh5# Usage:COMMENT