FreeToken brings datacenter-scale model serving to your desktop. Run massive models locally, fast and efficiently.
This report summarizes scanner evidence for FlashML-org/FreeToken, a Python project with 14,398 GitHub stars. SynthScan examined 148,986 lines of code across 669 source files, recording 3199 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 26.7 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 1596 finding(s).
Are imports declared and package/API names verified? 924 finding(s).
Are wrappers, guards, and repeated structures necessary? 2018 finding(s).
Which changes need focused human review? 3199 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 3199 distinct pattern matches across 21 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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 | 357 | def _remove_toml_root_string_value(text: str, key: str, value: str) -> str: | CODE |
| LOW | python/freetoken/launch.py | 378 | def _codex_migrated_base_config_text(existing: str) -> str: | CODE |
| LOW | python/freetoken/launch.py | 581 | def _openclaw_has_freetoken_provider(config: dict[str, object]) -> bool: | CODE |
| LOW | python/freetoken/launch.py | 591 | def _confirm_openclaw_first_patch(ctx: LaunchContext, config_path: Path) -> bool: | CODE |
| LOW | python/freetoken/launch.py | 657 | 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 | 155 | 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/attention/dsv41_sparse.py | 387 | def select_topk_in_candidates(scores: torch.Tensor, candidates: torch.Tensor, topk: int) -> torch.Tensor: | CODE |
| LOW | python/freetoken/layers/mhc.py | 188 | def mhc_fused_post_pre_single_pass_torch( | CODE |
| LOW | python/freetoken/layers/mhc.py | 213 | def mhc_fused_post_pre_single_pass( | 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 | 180 | def maybe_free_swa_out_of_window(self, reqs: List[Req], *, forward_iter: int) -> None: | CODE |
| LOW | python/freetoken/scheduler/cache.py | 219 | def free_swa_out_of_window_extend(self, reqs: List[Req]) -> None: | CODE |
| LOW | python/freetoken/scheduler/scheduler.py | 875 | def _report_prompt_admissions(self, batch: Batch) -> None: | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 78 | def register_anthropic_routes( | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 110 | async def handle_anthropic_messages( | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 147 | async def handle_anthropic_count_tokens(req: AnthropicCountTokensRequest, state: Any): | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 313 | def convert_anthropic_to_genspec( | CODE |
| LOW⚡ | python/freetoken/server/anthropic_api.py | 636 | def _validation_error_message(exc: RequestValidationError) -> str: | CODE |
| LOW⚡ | python/freetoken/server/anthropic_api.py | 647 | 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 | 188 | def convert_responses_to_genspec( | CODE |
| LOW | python/freetoken/server/responses_api.py | 496 | 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 | 3686 | def parse_streaming_increment(self, new_text: str) -> StreamingParseResult: | CODE |
| LOW⚡ | python/freetoken/server/function_call_parser.py | 3695 | 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 | 436 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 711 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 970 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1333 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1687 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1994 | 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 | 2106 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 2787 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 2965 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 3197 | def _finalize_truncated_invoke(self, reason: str = "tool channel closed") -> List[ToolCallItem]: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 3308 | def parse_streaming_increment(self, new_text: str, tools: List[Tool]) -> StreamingParseResult: | CODE |
| LOW | python/freetoken/server/openai_api.py | 242 | async def stream_chat_completion_chunks( | CODE |
| LOW | python/freetoken/server/openai_api.py | 650 | def _response_format_unsupported(response_format: dict[str, Any] | None) -> bool: | CODE |
| LOW | python/freetoken/server/openai_api.py | 655 | def _completion_unsupported_reason(req: CompletionRequest) -> str | None: | CODE |
| LOW | python/freetoken/server/api_server.py | 71 | def _terminate_backend_workers(processes: List[Any]) -> None: | CODE |
| LOW | python/freetoken/server/api_server.py | 90 | def _exit_after_backend_death(grace_s: float) -> threading.Timer: | CODE |
| LOW | python/freetoken/server/api_server.py | 486 | async def _record_request_middleware(request: Request, call_next): | CODE |
| 1261 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/dsv41_sparse.py | 22 | 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 | 34 | 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 | 1 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 1 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 10 | CODE | |
| LOW | python/freetoken/layers/__init__.py | 10 | CODE | |
| 858 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | python/freetoken/layers/moe.py | 253 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/layers/moe.py | 259 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/layers/moe.py | 403 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/layers/moe.py | 406 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/layers/quantization/scheme.py | 74 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/layers/quantization/scheme.py | 76 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/layers/quantization/moe/nvfp4.py | 81 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/layers/quantization/moe/nvfp4.py | 92 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/layers/quantization/moe/nvfp4.py | 282 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/layers/quantization/moe/nvfp4.py | 300 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/server/function_call_parser.py | 3166 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/server/function_call_parser.py | 3168 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/server/function_call_parser.py | 3481 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/server/function_call_parser.py | 3483 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | python/freetoken/models/loader.py | 154 | # --------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/loader.py | 160 | # --------------------------------------------------------------------------------- | 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 | 327 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen3_5_moe/weight.py | 329 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/deepseek_v4/weight.py | 177 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/deepseek_v4/weight.py | 179 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/deepseek_v4/weight.py | 229 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/deepseek_v4/weight.py | 231 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/glm4_moe/weight.py | 40 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/glm4_moe/weight.py | 42 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | python/freetoken/models/glm4_moe/weight.py | 192 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | python/freetoken/models/glm4_moe/weight.py | 194 | # -------------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/models/qwen4_exp/weight.py | 247 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/models/qwen4_exp/weight.py | 249 | # ====================================================================================== | COMMENT |
| MEDIUM⚡ | python/freetoken/models/qwen4_exp/weight.py | 380 | # ====================================================================================== | COMMENT |
| MEDIUM⚡ | python/freetoken/models/qwen4_exp/weight.py | 382 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_blockscale_moe.py | 130 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_blockscale_moe.py | 134 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 94 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 96 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 172 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 175 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 229 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 244 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 355 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 356 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 34 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 36 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 84 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 86 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 157 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fp8_block_linear.py | 161 | # ====================================================================================== | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fused_moe.py | 219 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fused_moe.py | 232 | # ---------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fused_moe.py | 260 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | python/freetoken/kernel/triton/fused_moe.py | 297 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | python/freetoken/kernel/triton/minimax_m3_sparse.py | 100 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | python/freetoken/kernel/triton/minimax_m3_sparse.py | 104 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | python/freetoken/kernel/triton/minimax_m3_sparse.py | 287 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | python/freetoken/kernel/triton/minimax_m3_sparse.py | 290 | # --------------------------------------------------------------------------- | COMMENT |
| 118 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/freetoken/env.py | 27 | except Exception: | CODE |
| HIGH | python/freetoken/control_cli.py | 493 | except ControlCliError: | CODE |
| HIGH | python/freetoken/llm/llm.py | 118 | except RequestAllFinished: | CODE |
| HIGH | python/freetoken/checkpoint/ftw.py | 285 | except (AttributeError, OSError): | CODE |
| HIGH | python/freetoken/checkpoint/convert.py | 48 | except Exception: | CODE |
| HIGH | python/freetoken/shell/tui.py | 750 | except (EOFError, KeyboardInterrupt): | CODE |
| HIGH | python/freetoken/tokenizer/server.py | 264 | except KeyboardInterrupt: | CODE |
| HIGH | python/freetoken/server/request_logger.py | 127 | except Exception: # noqa: BLE001 | CODE |
| HIGH | python/freetoken/server/generation.py | 235 | except json.JSONDecodeError: | CODE |
| HIGH | python/freetoken/server/function_call_parser.py | 222 | except ValueError: | CODE |
| HIGH | python/freetoken/server/api_server.py | 317 | except RuntimeError: | CODE |
| HIGH | python/freetoken/server/api_server.py | 232 | except Exception: # noqa: BLE001 -- warmup only; real faults surface on use | CODE |
| HIGH | python/freetoken/server/launch.py | 27 | except Exception: # noqa: BLE001 -- reporting is a nicety; never shadow the real exception | CODE |
| HIGH | python/freetoken/server/launch.py | 45 | except OSError: # no job control (already a group leader / unusual environment) | CODE |
| HIGH | python/freetoken/server/launch.py | 104 | except Exception: # noqa: BLE001 -- metadata is a nicety; readiness is not | CODE |
| HIGH | python/freetoken/utils/arch.py | 47 | except (AttributeError, RuntimeError): | CODE |
| HIGH | python/freetoken/utils/progress.py | 41 | except Exception: # noqa: BLE001 — progress reporting must never break load | CODE |
| HIGH | python/freetoken/utils/progress.py | 71 | except Exception: # noqa: BLE001 — progress reporting must never break load | CODE |
| HIGH | python/freetoken/utils/hf.py | 45 | except Exception: | CODE |
| HIGH | python/freetoken/models/weight.py | 114 | except OSError: | CODE |
| HIGH | python/freetoken/models/loader.py | 82 | except OSError: | CODE |
| HIGH | python/freetoken/models/loader.py | 205 | except Exception: # noqa: BLE001 -- best-effort handle cleanup | CODE |
| HIGH | python/freetoken/models/minimax_m3/weight.py | 86 | except Exception: # pragma: no cover - best effort | CODE |
| HIGH | python/freetoken/models/gguf/tokenizer.py | 70 | except ValueError: | CODE |
| HIGH | python/freetoken/models/deepseek_v4/weight.py | 51 | except Exception: | CODE |
| HIGH | python/freetoken/models/glm_moe_dsa/weight.py | 54 | except Exception: # pragma: no cover - best effort | CODE |
| HIGH | python/freetoken/models/glm4_moe/weight.py | 69 | except Exception: # pragma: no cover - best effort | CODE |
| HIGH | python/freetoken/kvcache/cache_status.py | 61 | except Exception: # noqa: BLE001 -- best-effort; a bad read must never block readiness | CODE |
| HIGH | python/freetoken/kvcache/cache_status.py | 161 | except Exception: # noqa: BLE001 -- best-effort; readiness must not depend on this | CODE |
| HIGH | python/freetoken/daemon/tailer.py | 75 | except Exception: # noqa: BLE001 — the tailer must never take the daemon down | CODE |
| HIGH | python/freetoken/daemon/tailer.py | 81 | except OSError: | CODE |
| HIGH | python/freetoken/daemon/pidfile.py | 80 | except FileNotFoundError: | CODE |
| HIGH | python/freetoken/daemon/pidfile.py | 91 | except FileNotFoundError: | CODE |
| HIGH | python/freetoken/daemon/pidfile.py | 93 | except OSError: # pragma: no cover - defensive | CODE |
| HIGH | python/freetoken/daemon/pidfile.py | 47 | except OSError: | CODE |
| HIGH | python/freetoken/daemon/server.py | 83 | except OSError: | CODE |
| HIGH | python/freetoken/daemon/server.py | 75 | except (ValueError, OSError): # pragma: no cover - non-main-thread / unsupported | CODE |
| HIGH | python/freetoken/daemon/server.py | 96 | except Exception: # noqa: BLE001 | CODE |
| HIGH | python/freetoken/daemon/accounting.py | 157 | except OSError: | CODE |
| HIGH | python/freetoken/daemon/accounting.py | 91 | except OSError: | CODE |
| HIGH | python/freetoken/daemon/checkpoint.py | 173 | except Exception: # noqa: BLE001 | CODE |
| HIGH | python/freetoken/daemon/checkpoint.py | 128 | except Exception: # noqa: BLE001 | CODE |
| HIGH | python/freetoken/daemon/client.py | 114 | except KeyboardInterrupt: | CODE |
| HIGH | python/freetoken/daemon/serve_manager.py | 948 | except Exception: # noqa: BLE001 — logging must never break control flow | CODE |
| HIGH | python/freetoken/daemon/serve_manager.py | 744 | except Exception: # noqa: BLE001 | CODE |
| HIGH | python/freetoken/daemon/serve_manager.py | 835 | except Exception: # noqa: BLE001 | CODE |
| HIGH | python/freetoken/daemon/app.py | 486 | except RuntimeError: # loop is closing during shutdown | CODE |
| HIGH | python/freetoken/daemon/app.py | 146 | except Exception: # noqa: BLE001 | CODE |
| HIGH | python/freetoken/daemon/app.py | 417 | except Exception: # noqa: BLE001 -- the arg below is the fallback | CODE |
| HIGH | python/freetoken/daemon/app.py | 480 | except asyncio.QueueEmpty: # pragma: no cover - race-only | CODE |
| HIGH | python/freetoken/daemon/osproc.py | 127 | except ProcessLookupError: | CODE |
| HIGH | python/freetoken/daemon/osproc.py | 129 | except OSError: # pragma: no cover - defensive | CODE |
| HIGH | python/freetoken/daemon/logring.py | 42 | except Exception: # noqa: BLE001 — a broken subscriber must never kill the tailer | CODE |
| HIGH | python/freetoken/moe/bench_profile.py | 64 | except OSError: | CODE |
| HIGH | python/freetoken/moe/host_banks.py | 392 | except OSError: | CODE |
| HIGH | python/freetoken/moe/host_banks.py | 443 | except OSError: | CODE |
| HIGH | python/freetoken/moe/host_banks.py | 188 | except (OSError, ValueError): | CODE |
| HIGH | python/freetoken/moe/benchbw.py | 226 | except (AttributeError, OSError): | CODE |
| HIGH | python/freetoken/moe/expert_banks.py | 226 | except OSError: | CODE |
| HIGH | python/freetoken/kernel/utils.py | 117 | except ImportError: | CODE |
| 6 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 | 511 | 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 | 199 | __all__ = [ | CODE |
| LOW | python/freetoken/attention/qsa_sparse.py | 345 | def _update_index_cache(self, index, md: QSASparseMetadata, slot: int) -> None: | CODE |
| LOW | python/freetoken/attention/qsa_sparse.py | 542 | __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/dsv41_sparse.py | 438 | __all__ = ["DSV41SparseAttnBackend", "DSV41AttnMetadata", "PrefillSegment", "SharedSelection"] | 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 | 738 | __all__ = [ | CODE |
| LOW | python/freetoken/checkpoint/convert.py | 327 | __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 | 241 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/__init__.py | 31 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/activation.py | 86 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/rotary.py | 346 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/quantization/quant_backend.py | 73 | def set_quant_backend(backend: QuantBackend) -> None: | CODE |
| LOW | python/freetoken/layers/quantization/__init__.py | 41 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/quantization/linear/__init__.py | 9 | __all__ = [ | CODE |
| LOW | …thon/freetoken/layers/quantization/configs/__init__.py | 22 | def set_quant_config(quant: QuantConfig | None) -> None: | CODE |
| LOW | …thon/freetoken/layers/quantization/configs/__init__.py | 34 | __all__ = [ | CODE |
| LOW | python/freetoken/layers/quantization/moe/__init__.py | 9 | __all__ = [ | 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 | 86 | __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/scheduler/mm.py | 91 | __all__ = ["cut_image_spans", "mm_chunk_end", "mm_rows_after", "plan_mm_batch", "plan_mm_chunk"] | CODE |
| LOW | python/freetoken/message/__init__.py | 23 | __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 | 728 | def _update_prev() -> None: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1353 | def _update_prev() -> None: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1711 | def _update_prev_args() -> None: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 2129 | def _update_prev() -> None: | CODE |
| LOW | python/freetoken/utils/__init__.py | 31 | __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/register.py | 363 | __all__ = ["ModelSpec", "checkpoint_quant_config", "get_model_spec", "get_model_class"] | CODE |
| LOW | python/freetoken/models/__init__.py | 21 | __all__ = [ | CODE |
| LOW | python/freetoken/models/weight.py | 283 | __all__ = [ | CODE |
| LOW | python/freetoken/models/weight_stream.py | 122 | __all__ = ["BlockWeightStreamer"] | CODE |
| LOW | python/freetoken/models/loader.py | 302 | __all__ = [ | CODE |
| LOW | python/freetoken/models/nvfp4_banks.py | 138 | __all__ = ["Nvfp4ExpertSourceSpec", "iter_nvfp4_expert_pieces"] | CODE |
| LOW | python/freetoken/models/blocks.py | 93 | __all__ = ["BaseLLMModel", "GatedMLP"] | CODE |
| LOW | python/freetoken/models/gpt_oss/attention.py | 97 | __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", "iter_expert_pieces"] | CODE |
| LOW | python/freetoken/models/gpt_oss/weight.py | 345 | __all__ = [ | CODE |
| 237 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 | 434 | CODE | |
| LOW | python/freetoken/benchmark/perf.py | 10 | CODE | |
| LOW | python/freetoken/checkpoint/ftw.py | 472 | CODE | |
| LOW | python/freetoken/checkpoint/ftw.py | 675 | CODE | |
| LOW | python/freetoken/checkpoint/ftw.py | 272 | CODE | |
| LOW | python/freetoken/checkpoint/convert.py | 165 | CODE | |
| LOW | python/freetoken/layers/moe.py | 443 | CODE | |
| LOW | python/freetoken/layers/rotary.py | 96 | CODE | |
| LOW | python/freetoken/layers/quantization/method.py | 64 | CODE | |
| LOW | python/freetoken/layers/quantization/method.py | 71 | CODE | |
| LOW | python/freetoken/shell/tui.py | 533 | CODE | |
| LOW | python/freetoken/shell/tui.py | 611 | CODE | |
| LOW | python/freetoken/tokenizer/server.py | 127 | CODE | |
| LOW | python/freetoken/tokenizer/inline_system.py | 74 | CODE | |
| LOW | python/freetoken/tokenizer/inline_system.py | 124 | CODE | |
| LOW | python/freetoken/tokenizer/tokenize.py | 243 | CODE | |
| LOW | python/freetoken/scheduler/cache.py | 591 | CODE | |
| LOW | python/freetoken/scheduler/prefill.py | 294 | CODE | |
| LOW | python/freetoken/scheduler/mm.py | 37 | CODE | |
| LOW | python/freetoken/scheduler/mm.py | 67 | CODE | |
| LOW | python/freetoken/scheduler/scheduler.py | 312 | CODE | |
| LOW | python/freetoken/scheduler/scheduler.py | 488 | CODE | |
| LOW | python/freetoken/server/anthropic_api.py | 186 | CODE | |
| LOW | python/freetoken/server/anthropic_api.py | 431 | 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 | 188 | CODE | |
| LOW | python/freetoken/server/responses_api.py | 496 | CODE | |
| LOW | python/freetoken/server/generation.py | 207 | CODE | |
| LOW | python/freetoken/server/generation.py | 243 | CODE | |
| LOW | python/freetoken/server/generation.py | 389 | CODE | |
| LOW | python/freetoken/server/generation.py | 595 | CODE | |
| LOW | python/freetoken/server/generation.py | 654 | CODE | |
| LOW | python/freetoken/server/supervisor.py | 99 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 182 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 352 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 363 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 436 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 711 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 1069 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 1333 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 1687 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2106 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2534 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2572 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2787 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 2965 | CODE | |
| LOW | python/freetoken/server/function_call_parser.py | 3308 | CODE | |
| LOW | python/freetoken/server/openai_api.py | 242 | CODE | |
| LOW | python/freetoken/utils/arch.py | 25 | CODE | |
| LOW | python/freetoken/models/config.py | 463 | CODE | |
| LOW | python/freetoken/models/weight.py | 68 | CODE | |
| LOW | python/freetoken/models/weight.py | 155 | CODE | |
| LOW | python/freetoken/models/weight.py | 105 | CODE | |
| LOW | python/freetoken/models/loader.py | 222 | CODE | |
| LOW | python/freetoken/models/loader.py | 249 | CODE | |
| LOW | python/freetoken/models/nvfp4_banks.py | 66 | CODE | |
| LOW | python/freetoken/models/nvfp4_banks.py | 111 | CODE | |
| 94 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 | 304 | except Exception: | CODE |
| LOW | python/freetoken/layers/quantization/linear/nvfp4.py | 53 | except Exception as exc: | CODE |
| LOW | python/freetoken/layers/quantization/moe/nvfp4.py | 115 | except Exception as exc: | CODE |
| LOW | python/freetoken/layers/quantization/moe/nvfp4.py | 323 | except Exception as exc: | CODE |
| LOW | python/freetoken/layers/quantization/moe/nvfp4.py | 340 | 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/inline_system.py | 171 | except Exception as exc: | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 196 | except Exception: # noqa: BLE001 -- template rejects the probe shape, not the effort | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 202 | except Exception: # noqa: BLE001 -- any raise means "not accepted" | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 225 | except Exception: # noqa: BLE001 -- a rejecting template is not this dialect | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 249 | except Exception: # noqa: BLE001 -- the encoder owns validation | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 256 | except Exception: # noqa: BLE001 | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 272 | except Exception: # noqa: BLE001 -- can't observe the toggle; assume none | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 281 | except Exception: # noqa: BLE001 -- adaptive is not a state this template knows | CODE |
| LOW | python/freetoken/tokenizer/effort.py | 300 | except Exception: # noqa: BLE001 -- exotic tensor comparison; treat as divergence | CODE |
| LOW | python/freetoken/scheduler/scheduler.py | 688 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | python/freetoken/scheduler/scheduler.py | 714 | except Exception as e2: # noqa: BLE001 — rollback failed too; genuinely unrecoverable | CODE |
| LOW | python/freetoken/scheduler/scheduler.py | 783 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 176 | except Exception as exc: # noqa: BLE001 — tokenizer init / other failure -> server error | CODE |
| LOW | python/freetoken/server/anthropic_api.py | 602 | except Exception as exc: # noqa: BLE001 — surface as an Anthropic error event | CODE |
| LOW⚡ | python/freetoken/server/anthropic_api.py | 643 | except Exception: # noqa: BLE001 — never let error formatting raise | CODE |
| LOW | python/freetoken/server/responses_api.py | 747 | 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 | 35 | except Exception: # pragma: no cover — jinja2 always ships with transformers | CODE |
| LOW | python/freetoken/server/generation.py | 380 | except Exception: # noqa: BLE001 -- server fault, not this request's problem | CODE |
| LOW | python/freetoken/server/generation.py | 384 | 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 | 3680 | except Exception: # noqa: BLE001 — recovery is best-effort by definition | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 654 | except Exception as e: | CODE |
| LOW | python/freetoken/server/function_call_parser.py | 1315 | except Exception as e: | CODE |
| LOW | python/freetoken/server/openai_api.py | 692 | except Exception: # noqa: BLE001 -- metadata only; the generation path reports real faults | CODE |
| LOW | python/freetoken/server/openai_api.py | 712 | except Exception: # noqa: BLE001 | CODE |
| LOW | python/freetoken/server/api_server.py | 86 | except Exception: # noqa: BLE001 -- already-gone / unqueryable handle: nothing to do | CODE |
| LOW | python/freetoken/server/api_server.py | 113 | except Exception: # noqa: BLE001 -- already-gone / unqueryable handle: nothing to do | CODE |
| LOW | python/freetoken/server/api_server.py | 232 | except Exception: # noqa: BLE001 -- warmup only; real faults surface on use | CODE |
| LOW | python/freetoken/server/api_server.py | 569 | except Exception as e: # noqa: BLE001 | CODE |
| LOW | python/freetoken/server/api_server.py | 727 | except Exception: # noqa: BLE001 -- limits are a nicety; a bad read must not 500 the poll | CODE |
| LOW | python/freetoken/server/api_server.py | 795 | except Exception: | CODE |
| LOW | python/freetoken/server/api_server.py | 809 | except Exception: | CODE |
| LOW | python/freetoken/server/api_server.py | 818 | except Exception: | CODE |
| MEDIUM | python/freetoken/server/api_server.py | 229 | 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 | 175 | except Exception: | CODE |
| LOW | python/freetoken/server/args.py | 226 | 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 |
| 62 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | install.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | install.sh | 21 | # unset and FREETOKEN_WHEEL is local, the script | COMMENT |
| LOW | install.sh | 201 | COMMENT | |
| LOW | pyproject.toml | 81 | # kernels in freetoken.kernel.triton (and the 'triton' attention backend). Install | COMMENT |
| LOW | python/freetoken/core.py | 121 | phase: Literal["prefill", "decode"] | COMMENT |
| LOW | python/freetoken/core.py | 141 | active_table_idx: "torch.Tensor | None" = None | COMMENT |
| LOW | python/freetoken/attention/fi.py | 81 | def __init__(self, config: ModelConfig) -> None: | COMMENT |
| LOW | python/freetoken/layers/quantization/moe/nvfp4.py | 81 | # --------------------------------------------------------------------------- | COMMENT |
| LOW | python/freetoken/layers/quantization/moe/nvfp4.py | 281 | COMMENT | |
| LOW | python/freetoken/scheduler/scheduler.py | 101 | ) | 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 | COMMENT | |
| LOW | python/freetoken/server/function_call_parser.py | 261 | # bot_token is a parse trigger, not a uniqueness claim. | COMMENT |
| LOW | python/freetoken/server/api_server.py | 141 | ack_map: Dict[int, List[UserReply]] = field(default_factory=dict) | COMMENT |
| LOW | python/freetoken/server/api_server.py | 161 | # Runtime metrics for /v1/stats: throughput sliding window + last-known kv/mamba/vram | COMMENT |
| LOW | python/freetoken/server/api_server.py | 181 | gpus: List[Dict[str, Any]] = field(default_factory=list) | COMMENT |
| LOW | python/freetoken/server/args.py | 41 | # kept out of repr: parse_args logs the whole ServerArgs | COMMENT |
| LOW | python/freetoken/models/config.py | 281 | # where routed experts decode (gpu / cpu / hybrid); set by the engine from the flags, it gates which expert kernels | COMMENT |
| LOW | python/freetoken/models/config.py | 341 | # None for every other model. | COMMENT |
| LOW | python/freetoken/models/deepseek_v4/model.py | 161 | # concatenated (cu_seqlens, no padding); each request starts at its own cached_len | COMMENT |
| LOW | python/freetoken/models/deepseek_v4/model.py | 181 | def decode( | COMMENT |
| LOW | python/freetoken/kvcache/dsv4/v4_pool.py | 61 | # the first n_layers, so truncate to match. | COMMENT |
| LOW | python/freetoken/engine/config.py | 61 | # list ("3,7,11"), a count ("8" -> 8 layers evenly strided across depth), or a | COMMENT |
| LOW | python/freetoken/engine/engine.py | 1001 | # Preserve the CUDA-graph batch-size set resolved at startup. The auto heuristic keys | COMMENT |
| LOW | python/freetoken/engine/engine.py | 1661 | ) | 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 | # W4A16); or "mxfp4_triton" (gpt-oss transposed split-K GEMV decode + _t grouped | COMMENT |
| LOW | python/freetoken/moe/offload_cache.py | 221 | # sync); read via ``decode_miss_stats``. Graph-safe: the ``+=`` is captured into the | 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 | …thon/freetoken/kernel/csrc/row_store/row_store_ext.cpp | 1 | // Disk-backed row store: fixed-width rows read straight from checkpoint shard tensors | COMMENT |
| LOW | …thon/freetoken/kernel/csrc/row_store/row_store_ext.cpp | 21 | #include <mutex> | 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 | …n/freetoken/kernel/csrc/include/freetoken/hip_compat.h | 1 | #pragma once | COMMENT |
| LOW | …n/freetoken/kernel/csrc/include/freetoken/hip_compat.h | 21 | COMMENT | |
| LOW | …n/freetoken/kernel/csrc/include/freetoken/hip_compat.h | 41 | #endif | COMMENT |
| LOW | …n/freetoken/kernel/csrc/include/freetoken/hip_compat.h | 61 | #endif | COMMENT |
| LOW | …n/freetoken/kernel/csrc/include/freetoken/hip_compat.h | 81 | #endif | COMMENT |
| LOW | …n/freetoken/kernel/csrc/include/freetoken/hip_compat.h | 101 | // TODO(ROCm): re-enable proper UVA query if HIP adds this attribute. | COMMENT |
| LOW | …n/freetoken/kernel/csrc/include/freetoken/hip_compat.h | 121 | COMMENT | |
| LOW | …n/freetoken/kernel/csrc/include/freetoken/hip_compat.h | 141 | #define cudaLaunchHostFunc hipLaunchHostFunc | 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 | 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 | #if (defined(__GNUC__) && __GNUC__ >= 10) || defined(__clang__) | COMMENT |
| LOW | python/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp | 761 | COMMENT | |
| LOW | python/freetoken/kernel/csrc/cpu_moe/cpu_moe_ext.cpp | 1101 | // Bandwidth notes (Sapphire Rapids 8480+, 13 cores): the two passes already read | COMMENT |
| LOW | python/freetoken/kernel/triton/fp8_pertensor_linear.py | 221 | a, weight, weight_scale, out, M, N, K, | COMMENT |
| LOW | python/freetoken/kernel/triton/causal_conv1d_triton.py | 41 | COMMENT | |
| LOW | python/freetoken/kernel/triton/nvfp4_linear.py | 361 | # [BLOCK_N, BLOCK_KW] words (coalesced along N in the K-major layout), dequanted in | 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 | |
| 10 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/freetoken/models/minimax_m3/config.py | 0 | none when the config carries no vision section, which is how a text-only engine asks for no tower. | STRING |
| HIGH | python/freetoken/models/glm5_next/config.py | 0 | none when the config carries no vision section, which is how a text-only engine asks for no tower. | STRING |
| HIGH | python/freetoken/models/muse_glimmer/config.py | 0 | none when the config carries no vision section, which is how a text-only engine asks for no tower. | STRING |
| HIGH | python/freetoken/models/minimax_m3/vision.py | 0 | kept as a real conv3d (kernel == stride): an equivalent unfolded matmul rounds differently. | STRING |
| HIGH | python/freetoken/models/glm5_next/vision.py | 0 | kept as a real conv3d (kernel == stride): an equivalent unfolded matmul rounds differently. | STRING |
| HIGH | python/freetoken/models/qwen3_vl/vision.py | 0 | kept as a real conv3d (kernel == stride): an equivalent unfolded matmul rounds differently. | STRING |
| HIGH | python/freetoken/models/minimax_m3/weight.py | 0 | the vision tower alone, named as iter_weights names it. | STRING |
| HIGH | python/freetoken/models/glm5_next/weight.py | 0 | the vision tower alone, named as iter_weights names it. | STRING |
| HIGH | python/freetoken/models/qwen3_5_moe/weight.py | 0 | the vision tower alone, named as iter_weights names it. | STRING |
| HIGH | python/freetoken/models/muse_glimmer/weight.py | 0 | the vision tower alone, named as iter_weights names it. | STRING |
| HIGH | python/freetoken/models/qwen4_exp/weight.py | 0 | the vision tower alone, named as iter_weights names it. | STRING |
| HIGH | python/freetoken/models/qwen3_vl/weight.py | 0 | the vision tower alone, named as iter_weights names it. | 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 |
|---|---|---|---|---|
| LOW | python/freetoken/layers/moe.py | 456 | CODE | |
| LOW | python/freetoken/layers/moe.py | 39 | CODE | |
| LOW | python/freetoken/layers/moe.py | 149 | CODE | |
| LOW | python/freetoken/daemon/proxy.py | 42 | CODE | |
| LOW | python/freetoken/daemon/serve_manager.py | 166 | CODE | |
| LOW | python/freetoken/moe/benchbw.py | 693 | CODE | |
| LOW | python/freetoken/moe/expert_banks.py | 282 | CODE | |
| LOW | python/freetoken/kernel/utils.py | 352 | CODE | |
| LOW | python/freetoken/kernel/triton/sampling.py | 636 | 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 | 86 | 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 | 740 | # codex reads this code to tell a blown context window from a generic failure. | COMMENT |
| MEDIUM | python/freetoken/server/generation.py | 397 | # </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 | 605 | # ================================ orchestration ================================ | COMMENT |
| MEDIUM | benchmarks/bench_load_weight_generic.py | 238 | # ---------------- parent orchestration ---------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | python/freetoken/kvcache/base.py | 260 | 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 |
|---|---|---|---|---|
| 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 | 29 | per-layer ``layer_scalar``. The feed-forward is the dual (shared MLP || routed MoE) | STRING |
| HIGH | python/freetoken/moe/cpu_executor.py | 633 | 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 | 646 | CODE | |
| MEDIUM | tests/server/test_responses_api.py | 678 | CODE | |
| MEDIUM | tests/server/test_responses_api.py | 755 | CODE | |
| MEDIUM | tests/server/test_anthropic_api.py | 588 | 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 | 981 | # Check if buffer contains complete end token (without leading newline) | COMMENT |
| LOW | python/freetoken/server/function_call_parser.py | 988 | # 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 |
| LOW | scripts/ci/fetch-nightly-pair.sh | 5 | # Usage: | COMMENT |