FreeToken brings datacenter-scale model serving to your desktop. Run massive models locally, fast and efficiently.
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | freetoken-kernel-cache/build_backend.py | 15 | def _ensure_freetoken_importable() -> None: | CODE |
| LOW | freetoken-kernel-cache/build_backend.py | 126 | def prepare_metadata_for_build_wheel(metadata_directory, config_settings=None): | CODE |
| LOW | python/freetoken/launch.py | 321 | def _remove_toml_root_string_value(text: str, key: str, value: str) -> str: | CODE |
| LOW | python/freetoken/launch.py | 342 | def _codex_migrated_base_config_text(existing: str) -> str: | CODE |
| LOW | python/freetoken/launch.py | 533 | def _openclaw_has_freetoken_provider(config: dict[str, object]) -> bool: | CODE |
| LOW | python/freetoken/launch.py | 543 | def _confirm_openclaw_first_patch(ctx: LaunchContext, config_path: Path) -> bool: | CODE |
| LOW | python/freetoken/launch.py | 609 | def _clear_openclaw_session_overrides(primary_model: str) -> None: | CODE |
| LOW | python/freetoken/benchmark/perf.py | 54 | def compare_memory_kernel_perf( | CODE |
| LOW⚡ | python/freetoken/benchmark/client.py | 313 | def process_benchmark_results(raw_data: List[RawResult], tokenizer: Any) -> BenchmarkResult: ... | CODE |
| LOW⚡ | python/freetoken/benchmark/client.py | 317 | def process_benchmark_results(raw_data: List[RawResult]) -> None: ... | CODE |
| LOW⚡ | python/freetoken/benchmark/client.py | 320 | def process_benchmark_results( | CODE |
| LOW | python/freetoken/attention/__init__.py | 145 | def create_qsa_sparse_backend(config: ModelConfig): | CODE |
| LOW | python/freetoken/attention/fi.py | 147 | def _initialize_metadata_once(self, metadata: FIMetadata) -> None: | CODE |
| LOW | python/freetoken/distributed/impl.py | 73 | def enable_pynccl_distributed( | CODE |
| LOW | python/freetoken/shell/tui.py | 60 | def _format_shell_model_label(model_id: str) -> str: | CODE |
| LOW | python/freetoken/scheduler/config.py | 34 | def zmq_scheduler_broadcast_addr(self) -> str: | CODE |
| LOW | python/freetoken/scheduler/config.py | 42 | def backend_create_detokenizer_link(self) -> bool: | CODE |
| LOW | python/freetoken/scheduler/cache.py | 178 | def maybe_free_swa_out_of_window(self, reqs: List[Req], *, forward_iter: int) -> None: | CODE |
| LOW | python/freetoken/scheduler/cache.py | 217 | def free_swa_out_of_window_extend(self, reqs: List[Req]) -> None: | CODE |
| LOW | python/freetoken/scheduler/scheduler.py | 843 | def _report_prompt_admissions(self, batch: Batch) -> None: | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 77 | def register_anthropic_routes( | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 109 | async def handle_anthropic_messages( | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 142 | async def handle_anthropic_count_tokens(req: AnthropicCountTokensRequest, state: Any): | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 302 | def convert_anthropic_to_genspec( | CODE |
| LOW⚡ | python/freetoken/server/anthropic_api.py | 603 | def _validation_error_message(exc: RequestValidationError) -> str: | CODE |
| LOW⚡ | python/freetoken/server/anthropic_api.py | 614 | def _anthropic_error_response( | CODE |
| LOW | python/freetoken/server/reasoning_parser.py | 69 | def _longest_harmony_partial_suffix(text: str) -> int: | CODE |
| LOW | python/freetoken/server/reasoning_parser.py | 156 | def parse_streaming_increment(self, new_text: str) -> ReasoningParseResult: | CODE |
| LOW | python/freetoken/server/reasoning_parser.py | 307 | def parse_streaming_increment(self, new_text: str) -> ReasoningParseResult: | CODE |
| LOW | python/freetoken/server/reasoning_parser.py | 494 | def parse_streaming_increment(self, new_text: str) -> ReasoningParseResult: | CODE |
| LOW | python/freetoken/server/reasoning_parser.py | 593 | def _longest_atem_partial_suffix(text: str) -> int: | CODE |
| LOW | python/freetoken/server/reasoning_parser.py | 700 | def parse_streaming_increment(self, new_text: str) -> ReasoningParseResult: | CODE |
| LOW | python/freetoken/server/responses_api.py | 111 | def register_responses_routes( | CODE |
| LOW | python/freetoken/server/responses_api.py | 186 | def convert_responses_to_genspec( | CODE |
| LOW | python/freetoken/server/responses_api.py | 470 | async def responses_stream_generator( | CODE |
| LOW | python/freetoken/server/accounting.py | 133 | def register_accounting_routes(app: FastAPI, get_state: Callable[[], Any]) -> None: | CODE |
| LOW | python/freetoken/server/access_log_filter.py | 80 | def install_polling_access_log_filter() -> None: | CODE |
| LOW⚡ | python/freetoken/server/function_call_parser.py | 3665 | def parse_streaming_increment(self, new_text: str) -> StreamingParseResult: | CODE |
| LOW⚡ | python/freetoken/server/function_call_parser.py | 3674 | def args_fragments_prefix_stable(self) -> bool: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 63 | def _should_forward_unknown_tool(name: Any) -> bool: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 434 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 709 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 968 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1331 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1677 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1984 | def _build_partial_arguments_json(self, func_name: str, partial_body: str, tools: List[Tool]) -> Optional[str]: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 2096 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 2777 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 2955 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 3187 | def _finalize_truncated_invoke(self, reason: str = "tool channel closed") -> List[ToolCallItem]: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 3298 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/openai_api.py | 231 | async def stream_chat_completion_chunks( | CODE |
| LOW | python/freetoken/server/openai_api.py | 622 | def _response_format_unsupported(response_format: dict[str, Any] | None) -> bool: | CODE |
| LOW | python/freetoken/server/openai_api.py | 627 | def _completion_unsupported_reason(req: CompletionRequest) -> str | None: | CODE |
| LOW | python/freetoken/server/api_server.py | 68 | def _terminate_backend_workers(processes: List[Any]) -> None: | CODE |
| LOW | python/freetoken/server/api_server.py | 87 | def _exit_after_backend_death(grace_s: float) -> threading.Timer: | CODE |
| LOW | python/freetoken/server/api_server.py | 447 | async def _record_request_middleware(request: Request, call_next): | CODE |
| LOW | python/freetoken/server/api_server.py | 848 | def _install_shell_stop_handlers() -> None: | CODE |
| LOW | python/freetoken/server/args.py | 68 | def backend_create_detokenizer_link(self) -> bool: | CODE |
| LOW | python/freetoken/server/args.py | 72 | def frontend_create_tokenizer_link(self) -> bool: | CODE |
| 1005 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 1 | CODE | |
| LOW | freetoken-kernel-cache/build_backend.py | 1 | CODE | |
| LOW | freetoken-kernel-cache/setup.py | 1 | CODE | |
| LOW | …etoken-kernel-cache/freetoken_kernel_cache/__init__.py | 1 | CODE | |
| LOW | python/freetoken/env.py | 1 | CODE | |
| LOW | python/freetoken/cache_report.py | 10 | CODE | |
| LOW | python/freetoken/__init__.py | 3 | CODE | |
| LOW | python/freetoken/core.py | 1 | CODE | |
| LOW | python/freetoken/core.py | 11 | CODE | |
| LOW | python/freetoken/launch.py | 1 | CODE | |
| LOW | python/freetoken/cli.py | 1 | CODE | |
| LOW | python/freetoken/gpu_select.py | 16 | CODE | |
| LOW | python/freetoken/control_cli.py | 1 | CODE | |
| LOW | python/freetoken/benchmark/perf.py | 1 | CODE | |
| LOW | python/freetoken/benchmark/client.py | 1 | CODE | |
| LOW | python/freetoken/attention/dsa_indexer.py | 17 | CODE | |
| LOW | python/freetoken/attention/dsv4_sparse.py | 30 | CODE | |
| LOW | python/freetoken/attention/triton.py | 1 | CODE | |
| LOW | python/freetoken/attention/linear.py | 1 | CODE | |
| LOW | python/freetoken/attention/linear.py | 9 | CODE | |
| LOW | python/freetoken/attention/__init__.py | 1 | CODE | |
| LOW | python/freetoken/attention/__init__.py | 8 | CODE | |
| LOW | python/freetoken/attention/__init__.py | 8 | CODE | |
| LOW | python/freetoken/attention/qsa_sparse.py | 32 | CODE | |
| LOW | python/freetoken/attention/fi.py | 1 | CODE | |
| LOW | python/freetoken/attention/dsv4_compress.py | 18 | CODE | |
| LOW | python/freetoken/attention/dsa_indexer_kpool.py | 31 | CODE | |
| LOW | python/freetoken/attention/dsa_indexer_kpool.py | 40 | CODE | |
| LOW | python/freetoken/attention/dsa_indexer_kpool.py | 41 | CODE | |
| LOW | python/freetoken/attention/dsa.py | 31 | CODE | |
| LOW | python/freetoken/attention/m3_sparse.py | 30 | CODE | |
| LOW | python/freetoken/attention/trtllm.py | 1 | CODE | |
| LOW | python/freetoken/attention/base.py | 1 | CODE | |
| LOW | python/freetoken/attention/dsv4_indexer.py | 14 | CODE | |
| LOW | python/freetoken/attention/fa.py | 1 | CODE | |
| LOW | python/freetoken/llm/__init__.py | 1 | CODE | |
| LOW | python/freetoken/llm/llm.py | 1 | CODE | |
| LOW | python/freetoken/checkpoint/ftw.py | 33 | CODE | |
| LOW | python/freetoken/checkpoint/convert.py | 16 | CODE | |
| LOW | python/freetoken/checkpoint/__init__.py | 7 | CODE | |
| LOW | python/freetoken/checkpoint/__init__.py | 7 | CODE | |
| LOW | python/freetoken/checkpoint/__init__.py | 7 | CODE | |
| LOW | python/freetoken/checkpoint/__init__.py | 7 | CODE | |
| LOW | python/freetoken/checkpoint/__init__.py | 7 | CODE | |
| LOW | python/freetoken/checkpoint/__init__.py | 14 | CODE | |
| LOW | python/freetoken/checkpoint/__main__.py | 10 | CODE | |
| LOW | python/freetoken/layers/gguf.py | 14 | CODE | |
| LOW | python/freetoken/layers/embedding.py | 1 | CODE | |
| LOW | python/freetoken/layers/mhc.py | 24 | CODE | |
| LOW | python/freetoken/layers/linear.py | 1 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 1 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 1 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 1 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 1 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 1 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 8 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 8 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 8 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 9 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 9 | CODE | |
| 621 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/freetoken/layers/moe.py | 280 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/layers/moe.py | 286 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/layers/moe.py | 425 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/layers/moe.py | 429 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/server/function_call_parser.py | 3156 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/server/function_call_parser.py | 3158 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/server/function_call_parser.py | 3471 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/server/function_call_parser.py | 3473 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/models/loader.py | 136 | # --------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/loader.py | 142 | # --------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/gemma4/gguf.py | 143 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/gemma4/gguf.py | 145 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/gemma4/gguf.py | 301 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/gemma4/gguf.py | 303 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/gemma4/gguf.py | 378 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/gemma4/gguf.py | 380 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/qwen3_5_moe/weight.py | 295 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen3_5_moe/weight.py | 297 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen3_5_moe/weight.py | 534 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen3_5_moe/weight.py | 536 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen3_5_moe/weight.py | 690 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen3_5_moe/weight.py | 692 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/deepseek_v4/weight.py | 166 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/deepseek_v4/weight.py | 168 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/glm4_moe/weight.py | 41 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/glm4_moe/weight.py | 43 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/glm4_moe/weight.py | 191 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/glm4_moe/weight.py | 193 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/qwen4_exp/weight.py | 187 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen4_exp/weight.py | 189 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen4_exp/weight.py | 287 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen4_exp/weight.py | 289 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/moe/nvfp4_backends.py | 61 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/moe/nvfp4_backends.py | 63 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/moe/nvfp4_backends.py | 275 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/moe/nvfp4_backends.py | 278 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/moe/nvfp4_backends.py | 450 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/moe/nvfp4_backends.py | 452 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/moe/nvfp4_backends.py | 502 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/moe/nvfp4_backends.py | 520 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_blockscale_moe.py | 126 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_blockscale_moe.py | 130 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/mxfp8_linear.py | 268 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/mxfp8_linear.py | 271 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 105 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 107 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 183 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 186 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 240 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 255 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 369 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 371 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 35 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 37 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 85 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 87 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 158 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 162 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 274 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 276 | # ====================================================================================== | COMMENT |
| 128 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …etoken-kernel-cache/freetoken_kernel_cache/__init__.py | 17 | __all__ = ["__version__", "get_jit_cache_dir", "jit_cache_dir"] | CODE |
| LOW | python/freetoken/__init__.py | 5 | __all__ = ["__version__"] | CODE |
| LOW | python/freetoken/launch.py | 465 | def _update_opencode_state(path: Path, model_ids: list[str]) -> None: | CODE |
| LOW | python/freetoken/gpu_select.py | 197 | def set_assigned_gpu(target: str) -> None: | CODE |
| LOW | python/freetoken/attention/dsa_indexer.py | 60 | __all__ = ["DSAIndexerMixin"] | CODE |
| LOW | python/freetoken/attention/dsv4_sparse.py | 291 | __all__ = ["DSV4SparseAttnBackend", "DSV4AttnMetadata"] | CODE |
| LOW | python/freetoken/attention/linear.py | 140 | __all__ = ["FLAMetadata", "build_fla_metadata"] | CODE |
| LOW | python/freetoken/attention/__init__.py | 189 | __all__ = [ | CODE |
| LOW | python/freetoken/attention/qsa_sparse.py | 318 | def _update_index_cache(self, index, md: QSASparseMetadata, slot: int) -> None: | CODE |
| LOW | python/freetoken/attention/qsa_sparse.py | 507 | __all__ = ["QSASparseAttnBackend", "QSASparseMetadata"] | CODE |
| LOW | python/freetoken/attention/dsv4_compress.py | 154 | __all__ = ["CompressorBackendMixin"] | CODE |
| LOW | python/freetoken/attention/dsa_indexer_kpool.py | 288 | __all__ = ["Glm5NextDSABackend"] | CODE |
| LOW | python/freetoken/attention/dsa.py | 376 | __all__ = ["DSAAttnBackend", "DSAMetadata"] | CODE |
| LOW | python/freetoken/attention/m3_sparse.py | 443 | __all__ = ["M3SparseAttnBackend", "M3SparseMetadata"] | CODE |
| LOW | python/freetoken/attention/dsv4_indexer.py | 87 | __all__ = ["IndexerBackendMixin"] | CODE |
| LOW | python/freetoken/llm/__init__.py | 3 | __all__ = ["LLM"] | CODE |
| LOW | python/freetoken/checkpoint/ftw.py | 636 | __all__ = [ | CODE |
| LOW | python/freetoken/checkpoint/convert.py | 304 | __all__ = ["convert_checkpoint"] | CODE |
| LOW | python/freetoken/checkpoint/__init__.py | 16 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/gguf.py | 128 | __all__ = ["GGUFLinear", "GGUFEmbedding", "fused_mul_mat_gguf"] | CODE |
| LOW | python/freetoken/layers/mhc.py | 143 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/__init__.py | 27 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/activation.py | 68 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/rotary.py | 234 | __all__ = ["get_rope", "RotaryEmbedding", "set_rope_device"] | CODE |
| LOW | python/freetoken/distributed/__init__.py | 4 | __all__ = [ | CODE |
| LOW | python/freetoken/distributed/info.py | 21 | def set_tp_info(rank: int, size: int) -> None: | CODE |
| LOW | python/freetoken/distributed/info.py | 38 | __all__ = ["DistributedInfo", "set_tp_info", "get_tp_info", "try_get_tp_info"] | CODE |
| LOW | python/freetoken/shell/__init__.py | 82 | __all__ = ["main"] | CODE |
| LOW | python/freetoken/shell/tui.py | 241 | def set_prompt_tokens(self, count: int) -> None: | CODE |
| LOW | python/freetoken/tokenizer/__init__.py | 3 | __all__ = ["tokenize_worker"] | CODE |
| LOW | python/freetoken/scheduler/__init__.py | 4 | __all__ = ["Scheduler", "SchedulerConfig"] | CODE |
| LOW | python/freetoken/message/__init__.py | 22 | __all__ = [ | CODE |
| LOW | python/freetoken/server/__init__.py | 3 | __all__ = ["launch_server"] | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 51 | logger = logging.getLogger(__name__) | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 726 | def _update_prev() -> None: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1351 | def _update_prev() -> None: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1701 | def _update_prev_args() -> None: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 2119 | def _update_prev() -> None: | CODE |
| LOW | python/freetoken/utils/__init__.py | 29 | __all__ = [ | CODE |
| LOW | python/freetoken/utils/progress.py | 20 | def set_progress_sink(sink: Optional[Callable[[str, int, int], None]]) -> None: | CODE |
| LOW | python/freetoken/utils/progress.py | 90 | __all__ = ["byte_bar", "count_bar", "set_progress_sink"] | CODE |
| LOW | python/freetoken/models/quant_linear.py | 73 | __all__ = [ | CODE |
| LOW | python/freetoken/models/register.py | 167 | __all__ = ["ModelSpec", "get_model_spec", "get_model_class"] | CODE |
| LOW | python/freetoken/models/__init__.py | 21 | __all__ = [ | CODE |
| LOW | python/freetoken/models/weight.py | 406 | __all__ = [ | CODE |
| LOW | python/freetoken/models/loader.py | 432 | __all__ = [ | CODE |
| LOW | python/freetoken/models/nvfp4_banks.py | 339 | __all__ = [ | CODE |
| LOW | python/freetoken/models/blocks.py | 63 | __all__ = ["BaseLLMModel", "GatedMLP"] | CODE |
| LOW | python/freetoken/models/gpt_oss/attention.py | 93 | __all__ = ["GptOssAttention"] | CODE |
| LOW | python/freetoken/models/gpt_oss/config.py | 113 | __all__ = ["parse_config"] | CODE |
| LOW | python/freetoken/models/gpt_oss/__init__.py | 5 | __all__ = ["GptOssForCausalLM", "parse_config", "iter_weights", "setup_offload_expert_banks"] | CODE |
| LOW | python/freetoken/models/gpt_oss/weight.py | 607 | __all__ = [ | CODE |
| LOW | python/freetoken/models/gpt_oss/model.py | 95 | __all__ = ["GptOssDecoderLayer", "GptOssForCausalLM", "GptOssModel"] | CODE |
| LOW | python/freetoken/models/gpt_oss/moe.py | 227 | __all__ = [ | CODE |
| LOW | python/freetoken/models/minimax_m3/attention.py | 122 | __all__ = ["MiniMaxM3Attention"] | CODE |
| LOW | python/freetoken/models/minimax_m3/config.py | 201 | __all__ = ["parse_config"] | CODE |
| LOW | python/freetoken/models/minimax_m3/__init__.py | 9 | __all__ = [ | CODE |
| LOW | python/freetoken/models/minimax_m3/weight.py | 283 | __all__ = ["iter_weights", "load_nvfp4_expert_sources", "load_nvfp4_expert_sources_parallel"] | CODE |
| LOW | python/freetoken/models/minimax_m3/mlp.py | 62 | __all__ = ["MiniMaxM3MLP", "make_proj"] | CODE |
| LOW | python/freetoken/models/minimax_m3/model.py | 100 | __all__ = ["MiniMaxM3ForCausalLM"] | CODE |
| 185 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | freetoken-kernel-cache/build_backend.py | 39 | except Exception: | CODE |
| LOW | python/freetoken/env.py | 27 | except Exception: | CODE |
| LOW | python/freetoken/attention/qsa_sparse.py | 65 | except Exception as exc: | CODE |
| LOW | python/freetoken/checkpoint/convert.py | 48 | except Exception: | CODE |
| LOW | python/freetoken/checkpoint/convert.py | 282 | except Exception: | CODE |
| LOW | python/freetoken/tokenizer/server.py | 99 | except Exception as exc: # noqa: BLE001 — isolate, never crash the worker | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 188 | except Exception: # noqa: BLE001 -- template rejects the probe shape, not the effort | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 194 | except Exception: # noqa: BLE001 -- any raise means "not accepted" | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 213 | except Exception: # noqa: BLE001 -- a rejecting template is not this dialect | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 243 | except Exception: # noqa: BLE001 -- can't observe the toggle; assume none | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 252 | except Exception: # noqa: BLE001 -- adaptive is not a state this template knows | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 271 | except Exception: # noqa: BLE001 -- exotic tensor comparison; treat as divergence | CODE |
| LOW | python/freetoken/scheduler/scheduler.py | 657 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | python/freetoken/scheduler/scheduler.py | 683 | except Exception as e2: # noqa: BLE001 — rollback failed too; genuinely unrecoverable | CODE |
| LOW | python/freetoken/scheduler/scheduler.py | 759 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 168 | except Exception as exc: # noqa: BLE001 — tokenizer init / other failure -> server error | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 569 | except Exception as exc: # noqa: BLE001 — surface as an Anthropic error event | CODE |
| LOW⚡ | python/freetoken/server/anthropic_api.py | 610 | except Exception: # noqa: BLE001 — never let error formatting raise | CODE |
| LOW | python/freetoken/server/responses_api.py | 721 | except Exception as exc: # noqa: BLE001 — never leave the client without a terminal event | CODE |
| LOW | python/freetoken/server/accounting.py | 87 | except Exception as exc: # noqa: BLE001 -- preserve engine on any abort transport error | CODE |
| LOW | python/freetoken/server/request_logger.py | 114 | except Exception as exc: # noqa: BLE001 — a write failure must not kill the thread | CODE |
| LOW | python/freetoken/server/request_logger.py | 127 | except Exception: # noqa: BLE001 | CODE |
| LOW | python/freetoken/server/request_logger.py | 176 | except Exception as exc: # noqa: BLE001 — logging must never break serving | CODE |
| LOW | python/freetoken/server/generation.py | 33 | except Exception: # pragma: no cover — jinja2 always ships with transformers | CODE |
| LOW | python/freetoken/server/generation.py | 331 | except Exception: # noqa: BLE001 -- server fault, not this request's problem | CODE |
| LOW | python/freetoken/server/generation.py | 335 | except Exception as exc: # noqa: BLE001 -- mirror the worker's classification | CODE |
| LOW | python/freetoken/server/supervisor.py | 70 | except Exception: # noqa: BLE001 — treat an unqueryable handle as alive | CODE |
| LOW⚡ | python/freetoken/server/function_call_parser.py | 3659 | except Exception: # noqa: BLE001 — recovery is best-effort by definition | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 652 | except Exception as e: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1313 | except Exception as e: | CODE |
| LOW | python/freetoken/server/openai_api.py | 664 | except Exception: # noqa: BLE001 -- metadata only; the generation path reports real faults | CODE |
| LOW | python/freetoken/server/openai_api.py | 684 | except Exception: # noqa: BLE001 | CODE |
| LOW | python/freetoken/server/api_server.py | 83 | except Exception: # noqa: BLE001 -- already-gone / unqueryable handle: nothing to do | CODE |
| LOW | python/freetoken/server/api_server.py | 110 | except Exception: # noqa: BLE001 -- already-gone / unqueryable handle: nothing to do | CODE |
| LOW | python/freetoken/server/api_server.py | 226 | except Exception: # noqa: BLE001 -- warmup only; real faults surface on use | CODE |
| LOW | python/freetoken/server/api_server.py | 530 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | python/freetoken/server/api_server.py | 680 | except Exception: # noqa: BLE001 -- limits are a nicety; a bad read must not 500 the poll | CODE |
| LOW | python/freetoken/server/api_server.py | 748 | except Exception: | CODE |
| LOW | python/freetoken/server/api_server.py | 762 | except Exception: | CODE |
| LOW | python/freetoken/server/api_server.py | 771 | except Exception: | CODE |
| MEDIUM | python/freetoken/server/api_server.py | 223 | def _warm() -> None: | CODE |
| LOW | python/freetoken/server/model_meta.py | 129 | except Exception: # noqa: BLE001 -- dummy/absent config: report "unknown", never raise | CODE |
| LOW | python/freetoken/server/launch.py | 27 | except Exception: # noqa: BLE001 -- reporting is a nicety; never shadow the real exception | CODE |
| LOW | python/freetoken/server/launch.py | 83 | except Exception as exc: # noqa: BLE001 -- surface the reason, then let it propagate | CODE |
| LOW | python/freetoken/server/launch.py | 104 | except Exception: # noqa: BLE001 -- metadata is a nicety; readiness is not | CODE |
| LOW | python/freetoken/server/args.py | 126 | except Exception: | CODE |
| LOW | python/freetoken/server/args.py | 175 | except Exception: | CODE |
| LOW | python/freetoken/utils/progress.py | 41 | except Exception: # noqa: BLE001 — progress reporting must never break load | CODE |
| LOW | python/freetoken/utils/progress.py | 71 | except Exception: # noqa: BLE001 — progress reporting must never break load | CODE |
| LOW | python/freetoken/utils/hf.py | 45 | except Exception: | CODE |
| LOW | python/freetoken/utils/hf.py | 72 | except Exception: | CODE |
| LOW | python/freetoken/utils/hf.py | 93 | except Exception: | CODE |
| LOW | python/freetoken/utils/hf.py | 126 | except Exception: | CODE |
| LOW | python/freetoken/utils/hf.py | 218 | except Exception as e: | CODE |
| LOW | python/freetoken/utils/hf.py | 236 | except Exception as e: | CODE |
| LOW | python/freetoken/models/weight.py | 204 | except Exception: # heuristic only -> default to serial; the real loader reports errors | CODE |
| LOW | python/freetoken/models/loader.py | 199 | except Exception: # noqa: BLE001 -- best-effort handle cleanup | CODE |
| LOW | python/freetoken/models/minimax_m3/weight.py | 94 | except Exception: # pragma: no cover - best effort | CODE |
| LOW | python/freetoken/models/qwen3_5_moe/weight.py | 829 | except Exception: | CODE |
| LOW | python/freetoken/models/deepseek_v4/weight.py | 51 | except Exception: | CODE |
| 55 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/freetoken/gpu_select.py | 71 | CODE | |
| LOW | python/freetoken/gpu_select.py | 127 | CODE | |
| LOW | python/freetoken/control_cli.py | 412 | CODE | |
| LOW | python/freetoken/benchmark/perf.py | 10 | CODE | |
| LOW | python/freetoken/checkpoint/ftw.py | 415 | CODE | |
| LOW | python/freetoken/checkpoint/ftw.py | 256 | CODE | |
| LOW | python/freetoken/checkpoint/convert.py | 163 | CODE | |
| LOW | python/freetoken/shell/tui.py | 531 | CODE | |
| LOW | python/freetoken/shell/tui.py | 609 | CODE | |
| LOW | python/freetoken/tokenizer/server.py | 128 | CODE | |
| LOW | python/freetoken/scheduler/cache.py | 615 | CODE | |
| LOW | python/freetoken/scheduler/scheduler.py | 302 | CODE | |
| LOW | python/freetoken/scheduler/scheduler.py | 477 | CODE | |
| LOW | python/freetoken/server/anthropic_api.py | 178 | CODE | |
| LOW | python/freetoken/server/anthropic_api.py | 398 | CODE | |
| LOW | python/freetoken/server/reasoning_parser.py | 348 | CODE | |
| LOW | python/freetoken/server/reasoning_parser.py | 726 | CODE | |
| LOW | python/freetoken/server/responses_api.py | 186 | CODE | |
| LOW | python/freetoken/server/responses_api.py | 470 | CODE | |
| LOW | python/freetoken/server/generation.py | 197 | CODE | |
| LOW | python/freetoken/server/generation.py | 340 | CODE | |
| LOW | python/freetoken/server/generation.py | 546 | CODE | |
| LOW | python/freetoken/server/generation.py | 605 | CODE | |
| LOW | python/freetoken/server/supervisor.py | 99 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 180 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 350 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 361 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 434 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 709 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 1067 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 1331 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 1677 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2096 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2524 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2562 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2777 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2955 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 3298 | CODE | |
| LOW | python/freetoken/server/openai_api.py | 231 | CODE | |
| LOW | python/freetoken/models/config.py | 433 | CODE | |
| LOW | python/freetoken/models/weight.py | 71 | CODE | |
| LOW | python/freetoken/models/weight.py | 169 | CODE | |
| LOW | python/freetoken/models/weight.py | 119 | CODE | |
| LOW | python/freetoken/models/loader.py | 214 | CODE | |
| LOW | python/freetoken/models/loader.py | 239 | CODE | |
| LOW | python/freetoken/models/loader.py | 159 | CODE | |
| LOW | python/freetoken/models/nvfp4_banks.py | 81 | CODE | |
| LOW | python/freetoken/models/nvfp4_banks.py | 220 | CODE | |
| LOW | python/freetoken/models/nvfp4_banks.py | 162 | CODE | |
| LOW | python/freetoken/models/nvfp4_banks.py | 287 | CODE | |
| LOW | python/freetoken/models/gpt_oss/weight.py | 205 | CODE | |
| LOW | python/freetoken/models/gpt_oss/weight.py | 355 | CODE | |
| LOW | python/freetoken/models/gpt_oss/weight.py | 215 | CODE | |
| LOW | python/freetoken/models/gpt_oss/weight.py | 426 | CODE | |
| LOW | python/freetoken/models/minimax_m3/weight.py | 147 | CODE | |
| LOW | python/freetoken/models/minimax_m2/weight.py | 45 | CODE | |
| LOW | python/freetoken/models/minimax_m2/weight.py | 60 | CODE | |
| LOW | python/freetoken/models/gemma4/gguf.py | 187 | CODE | |
| LOW | python/freetoken/models/gemma4/weight.py | 126 | CODE | |
| LOW | python/freetoken/models/glm5_next/weight.py | 180 | CODE | |
| 64 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | install.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | install.sh | 201 | # re-install can't inherit a stale/mismatched torch (e.g. an old cu128 venv after a cu130 bump). | COMMENT |
| LOW | python/freetoken/core.py | 121 | # decode to gather/scatter recurrent+conv state without host-side loops (so the | COMMENT |
| LOW | python/freetoken/attention/fi.py | 81 | def __init__(self, config: ModelConfig) -> None: | COMMENT |
| LOW | python/freetoken/scheduler/cache.py | 281 | self.swa_pool.alloc_swa(allocated) | COMMENT |
| LOW | python/freetoken/scheduler/scheduler.py | 661 | logger.error(f"cache rebuild failed before teardown: {e!r} — old cache intact") | COMMENT |
| LOW | python/freetoken/server/reasoning_parser.py | 561 | ATEM_MESSAGE = "<|message|>" | COMMENT |
| LOW | python/freetoken/server/responses_api.py | 181 | # --------------------------------------------------------------------------- # | COMMENT |
| LOW | python/freetoken/server/function_call_parser.py | 1 | # Adapted from LightLLM [https://github.com/ModelTC/lightllm/blob/main/lightllm/server/function_call_parser.py] | COMMENT |
| LOW | python/freetoken/server/function_call_parser.py | 241 | """Base class providing two sets of interfaces: one-time and streaming incremental.""" | COMMENT |
| LOW | python/freetoken/server/function_call_parser.py | 261 | COMMENT | |
| LOW | python/freetoken/server/function_call_parser.py | 3421 | # more blocks may still precede the boundary -- a second invoke block | COMMENT |
| LOW | python/freetoken/server/api_server.py | 141 | # /health state (loading/ok/error) and /v1/stats can identify the same engine generation. | COMMENT |
| LOW | python/freetoken/server/api_server.py | 161 | # Optional backend metadata delivered once on the ack path at ready: per-unit cache VRAM | COMMENT |
| LOW | python/freetoken/server/api_server.py | 181 | # handler) tears these down itself, AFTER setting _SHUTTING_DOWN, so the supervisor observes | COMMENT |
| LOW | python/freetoken/server/api_server.py | 781 | # pool without having to know how the server was started. | COMMENT |
| LOW | python/freetoken/server/args.py | 21 | # The workers read it to leave the shell's foreground process group, so the ^C that cancels | COMMENT |
| LOW | python/freetoken/models/config.py | 261 | nvfp4_backend: str = "triton" | COMMENT |
| LOW | python/freetoken/models/config.py | 321 | # GLM-5.3-Flash (glm5_next) payload (Glm5NextArgs): NoPE-MLA dims, the kpool indexer | COMMENT |
| LOW | python/freetoken/models/register.py | 61 | # Qwen3.8-Flash-Next (model_type qwen4_exp): multimodal wrapper config (text tower in | COMMENT |
| LOW | python/freetoken/models/deepseek_v4/model.py | 181 | return F.linear(h[0, last_indices], self.head) # [B, vocab] | COMMENT |
| LOW | python/freetoken/engine/config.py | 41 | # (cudaMemcpyBatchAsync); no-op unless moe_cache_size > 2 * num_experts. | COMMENT |
| LOW | python/freetoken/engine/config.py | 61 | page_size: int = 1 | COMMENT |
| LOW | python/freetoken/engine/engine.py | 1061 | # DSV4's KV page IS the P-token window page (window == radix reuse granularity == lcm of | COMMENT |
| LOW | python/freetoken/engine/engine.py | 1361 | raise ValueError( | COMMENT |
| LOW | python/freetoken/engine/engine.py | 1421 | # args.py's "no sizing flag -> default --moe-cache-auto" only fires when the | COMMENT |
| LOW | python/freetoken/moe/offload_cache.py | 21 | # call still moves bytes at full PCIe rate but stalls the host, which un-hides the | COMMENT |
| LOW | python/freetoken/moe/offload_cache.py | 121 | # prefill). The format names its bank layout (_BANK_SCHEMAS) and which kernels | COMMENT |
| LOW | python/freetoken/moe/offload_cache.py | 201 | # set_bank_sources). The GPU slot cache stays one unified pool per bank. | COMMENT |
| LOW | python/freetoken/moe/nvfp4_backends.py | 501 | COMMENT | |
| LOW | python/freetoken/moe/cpu_executor.py | 41 | # spin-wait kernel; that pinned reported utilization at 99% and laptop CPU/GPU dynamic | COMMENT |
| LOW | python/freetoken/kernel/csrc/include/freetoken/utils.h | 1 | #pragma once | COMMENT |
| LOW | python/freetoken/kernel/csrc/include/freetoken/utils.h | 21 | COMMENT | |
| LOW | python/freetoken/kernel/csrc/include/freetoken/tensor.h | 1 | #pragma once | COMMENT |
| LOW | …thon/freetoken/kernel/csrc/include/freetoken/nccl227.h | 1 | /************************************************************************* | COMMENT |
| LOW | python/freetoken/kernel/csrc/gguf/ggml-common.h | 1 | // adapted from | COMMENT |
| LOW | python/freetoken/kernel/csrc/gguf/dispatch.h | 1 | // Minimal AT_DISPATCH helper for the vendored GGUF kernels (borrowed from | COMMENT |
| LOW | …thon/freetoken/kernel/csrc/ple_store/ple_store_ext.cpp | 1 | // Disk-backed PLE row store: rows read straight from the checkpoint's fp8 shard tensors | COMMENT |
| LOW | …thon/freetoken/kernel/csrc/ple_store/ple_store_ext.cpp | 21 | #include <vector> | COMMENT |
| LOW | python/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp | 1 | // CPU-compute MoE executor for the "cpu" offload backend. | COMMENT |
| LOW | python/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp | 21 | #include <cmath> | COMMENT |
| LOW | python/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp | 461 | // distance otherwise prefetches another worker's tile: duplicated DRAM traffic that | COMMENT |
| LOW | python/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp | 561 | s += (e4m3[scale[b]] * asb[b]) * (float)isum; | COMMENT |
| LOW | python/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp | 761 | if (cpu_has_avxvnni()) return dot_nvfp4_i8_vnni; | COMMENT |
| LOW | python/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp | 1081 | int layer_id; | COMMENT |
| LOW | python/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp | 1101 | // Helps locality+bytes when bs is large; decode batches here are tiny (<=4). | COMMENT |
| LOW | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 241 | # Batched decode (M > 1) W8A8: quantize the activation with the checkpoint's static | COMMENT |
| LOW | python/freetoken/kernel/triton/causal_conv1d_triton.py | 41 | COMMENT | |
| LOW | python/freetoken/kernel/triton/nvfp4_linear.py | 361 | return out | COMMENT |
| LOW | python/freetoken/kernel/fla/solve_tril.py | 1 | # Vendored from vLLM's third_party/flash_linear_attention (PR #53906, commit 933876c3), | COMMENT |
| LOW | python/freetoken/kernel/fla/kda.py | 1 | # SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | python/freetoken/kernel/fla/kda_chunk_delta_h.py | 1 | # Vendored from vLLM's third_party/flash_linear_attention (PR #53906, commit 933876c3), | COMMENT |
| LOW | python/freetoken/kernel/fla/layernorm_gated.py | 1 | # Adapt from https://github.com/fla-org/flash-linear-attention/blob/main/fla/modules/layernorm_gated.py | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_delta_h.py | 21 | COMMENT | |
| LOW | python/freetoken/kernel/fla/fused_recurrent.py | 1 | # Vendored from vLLM's third_party/flash_linear_attention (PR #53906, commit 933876c3), | COMMENT |
| LOW | scripts/build-release-wheels.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | scripts/publish-wheels.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | scripts/ci/manylinux-build.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | .github/workflows/release.yml | 1 | # Tagged-release wheels: build the cp310-cp313 runtime matrix + the kernel-cache | COMMENT |
| LOW | .github/workflows/nightly-wheels.yml | 1 | # Nightly engine wheels: build on the self-hosted EC2 node and publish to the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/freetoken/models/minimax_m3/weight.py | 0 | cpu nvfp4 expert source banks for the offload cache; see load_nvfp4_expert_source_banks. | STRING |
| HIGH | python/freetoken/models/minimax_m2/weight.py | 0 | cpu nvfp4 expert source banks for the offload cache; see load_nvfp4_expert_source_banks. | STRING |
| HIGH | python/freetoken/models/gemma4/weight.py | 0 | cpu nvfp4 expert source banks for the offload cache; see load_nvfp4_expert_source_banks. | STRING |
| HIGH | python/freetoken/models/minimax_m3/weight.py | 0 | parallel: same nvfp4 source banks via the common chunked multi-threaded reader. | STRING |
| HIGH | python/freetoken/models/minimax_m2/weight.py | 0 | parallel: same nvfp4 source banks via the common chunked multi-threaded reader. | STRING |
| HIGH | python/freetoken/models/glm4_moe/weight.py | 0 | parallel: same nvfp4 source banks via the common chunked multi-threaded reader. | STRING |
| HIGH | python/freetoken/models/gemma4/weight.py | 0 | parallel: same nvfp4 source banks via the common chunked multi-threaded reader. | STRING |
| HIGH | python/freetoken/models/qwen3_5_moe/weight.py | 0 | parallel: same nvfp4 source banks via the common chunked multi-threaded reader. | STRING |
| HIGH | python/freetoken/models/qwen4_exp/weight.py | 0 | parallel: same nvfp4 source banks via the common chunked multi-threaded reader. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | python/freetoken/kernel/fla/utils.py | 232 | return triton.runtime.driver.active.utils.get_device_properties(tensor_idx)[ | CODE |
| CRITICAL | python/freetoken/kernel/fla/utils.py | 301 | triton.runtime.driver.active.utils.get_device_properties(i)[ | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/freetoken/attention/fa.py | 167 | window_size: Tuple[int, int] = (-1, -1), # -1 means infinite context window | CODE |
| MEDIUM | python/freetoken/server/responses_api.py | 714 | # codex reads this code to tell a blown context window from a generic failure. | COMMENT |
| MEDIUM | python/freetoken/server/generation.py | 348 | # </think>. Mirror that default here, else the chain-of-thought leaks into content. | COMMENT |
| MEDIUM | python/freetoken/server/model_meta.py | 58 | # model card recommends it for agentic use) rather than the OpenAI triple. | COMMENT |
| MEDIUM | python/freetoken/moe/benchbw.py | 603 | # ================================ orchestration ================================ | COMMENT |
| MEDIUM | benchmarks/bench_load_weight_generic.py | 238 | # ---------------- parent orchestration ---------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/freetoken/kvcache/base.py | 243 | Evict some prefixes from the cache to free up space. This operation will modify the cache. Note | STRING |
| HIGH | python/freetoken/kernel/fla/chunk.py | 141 | Args: q (torch.Tensor): queries of shape `[B, T, H, K]` if `head_first=False` else `[B, H, T, K | STRING |
| HIGH | python/freetoken/kernel/fla/fused_recurrent.py | 570 | Args: q (torch.Tensor): queries of shape `[B, T, H, K]`. k (torch.Tensor): | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/freetoken/layers/moe.py | 587 | CODE | |
| LOW | python/freetoken/daemon/serve_manager.py | 156 | CODE | |
| LOW | python/freetoken/moe/benchbw.py | 691 | CODE | |
| LOW | python/freetoken/kernel/utils.py | 232 | CODE | |
| LOW | python/freetoken/kernel/triton/sampling.py | 598 | CODE | |
| LOW | python/freetoken/kernel/fla/kda.py | 39 | CODE | |
| LOW | python/freetoken/kernel/fla/kda.py | 145 | CODE | |
| LOW | python/freetoken/kernel/fla/kda.py | 954 | CODE | |
| LOW | python/freetoken/kernel/fla/kda.py | 1215 | CODE | |
| LOW | python/freetoken/kernel/fla/kda_chunk_delta_h.py | 332 | CODE | |
| LOW | …freetoken/kernel/fla/fused_sigmoid_gating_recurrent.py | 247 | CODE | |
| LOW | python/freetoken/kernel/fla/fused_recurrent.py | 556 | CODE | |
| LOW | tests/models/qwen4_exp/common.py | 24 | CODE | |
| LOW | tests/daemon/test_daemon_serve_manager.py | 78 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/freetoken/cache_report.py | 21 | """Read an int out of a server document defensively: a missing key, a null, and a 0 all | STRING |
| HIGH | python/freetoken/attention/fa.py | 178 | "If you're sure it's correctly installed, try `apt update && apt install libnuma1`." | CODE |
| HIGH | python/freetoken/models/gemma4/model.py | 28 | per-layer ``layer_scalar``. The feed-forward is the dual (shared MLP || routed MoE) | STRING |
| HIGH | python/freetoken/moe/cpu_executor.py | 607 | is still pending (ready==1 && done==0), it was already pending when first | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/freetoken/kernel/fla/solve_tril.py | 9 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | python/freetoken/kernel/fla/kda.py | 5 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | python/freetoken/kernel/fla/kda_chunk_delta_h.py | 13 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| MEDIUM | python/freetoken/kernel/fla/fused_recurrent.py | 9 | # This file contains code copied from the flash-linear-attention project. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 124 | # Step 1: compute all 10 lower-triangular [BC, BC] blocks of K @ K^T | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 183 | # Step 2: apply gate and beta scaling | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 228 | # Step 3: forward substitution on diagonal blocks -> (I + A_diag)^{-1} | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 267 | # Step 4: block merge -> full (I + A)^{-1} | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 307 | # Step 5: store full (I + A)^{-1} to output A | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 389 | # Step 1: fused kkt + solve_tril | STRING |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 406 | # Step 2: recompute_w_u | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 124 | # Step 1: compute all 10 lower-triangular [BC, BC] blocks of K @ K^T | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 183 | # Step 2: apply gate and beta scaling | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 228 | # Step 3: forward substitution on diagonal blocks -> (I + A_diag)^{-1} | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 267 | # Step 4: block merge -> full (I + A)^{-1} | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 307 | # Step 5: store full (I + A)^{-1} to output A | COMMENT |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 389 | # Step 1: fused kkt + solve_tril | STRING |
| LOW | python/freetoken/kernel/fla/chunk_fwd.py | 406 | # Step 2: recompute_w_u | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/server/test_responses_api.py | 618 | CODE | |
| MEDIUM | tests/server/test_responses_api.py | 650 | CODE | |
| MEDIUM | tests/server/test_responses_api.py | 727 | CODE | |
| MEDIUM | tests/server/test_anthropic_api.py | 528 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/freetoken/kvcache/linear_state_pool.py | 94 | # flows between them by demand. Unused by the op harness (which assigns slots by hand). | COMMENT |
| MEDIUM | tests/models/test_glm5_next_kda_snapshot.py | 21 | from tests.models.test_glm5_next_kda_op import ( # reuse the op harness | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | python/freetoken/server/function_call_parser.py | 979 | # Check if buffer contains complete end token (without leading newline) | COMMENT |
| LOW | python/freetoken/server/function_call_parser.py | 986 | # Check if buffer might contain partial end token at the end | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/publish-wheels.sh | 5 | # Usage: | COMMENT |