MCPcopy Create free account

hub / github.com/brontoguana/krasis / functions

Functions12,380 in github.com/brontoguana/krasis

↓ 2 callersMethod_hf_results_screen
(self, candidates: List[Any])
python/krasis/launcher.py:1850
↓ 2 callersMethod_hqq_layer_kind
(layer: TransformerLayer)
python/krasis/model.py:2990
↓ 2 callersFunction_hqq_packed_cols
(cols: int, group_size: int)
python/krasis/attention_backend.py:1241
↓ 2 callersFunction_hqq_packed_cols_for_nbits
(cols: int, group_size: int, nbits: int)
python/krasis/attention_backend.py:1245
↓ 2 callersMethod_http_round_trip
Full HTTP round trip — prefill + decode via streaming SSE. Measures wall clock from HTTP request sent to last token received. Reports
python/krasis/benchmark.py:424
↓ 2 callersMethod_init_gpu_prefill
No-op: Python GPU prefill has been replaced by Rust prefill engine.
python/krasis/model.py:4500
↓ 2 callersMethod_init_kv_caches
Allocate paged KV caches per GPU split group. Streaming attention: all attention on GPU0, so single KV cache on GPU0. For hybrid mode
python/krasis/model.py:4898
↓ 2 callersFunction_int8_exception_candidate_decode_active
(candidate: Dict[str, Any])
python/krasis/hqq_self_calibrate.py:1900
↓ 2 callersFunction_int8_exception_candidate_prefill_only
(candidate: Dict[str, Any])
python/krasis/hqq_self_calibrate.py:1904
↓ 2 callersFunction_is_hybrid
True if model has a mix of linear and full attention layers.
python/krasis/vram_budget.py:234
↓ 2 callersFunction_is_marlin_compatible
Check if a weight tensor is compatible with Marlin quantization.
python/krasis/awq_calibrate.py:570
↓ 2 callersFunction_is_wsl
Check if running in WSL.
python/krasis/setup.py:260
↓ 2 callersFunction_json_safe
(value: Any)
tests/generate_reference.py:130
↓ 2 callersMethod_kv_cache_max_tokens
Return the maximum number of tokens the KV cache can hold.
python/krasis/benchmark.py:276
↓ 2 callersFunction_kv_dtype_bytes
(kv_cache_dtype: str, cfg: Optional[Dict[str, Any]] = None)
python/krasis/vram_budget.py:198
↓ 2 callersFunction_layer_bytes_from_manifest_dir
(cache_dir: Optional[str])
python/krasis/vram_budget.py:337
↓ 2 callersFunction_linear_attention_bytes_per_layer
Weight bytes for one linear attention (Gated DeltaNet) layer.
python/krasis/vram_budget.py:250
↓ 2 callersFunction_load_conf
(path: str)
tests/decode_harness.py:28
↓ 2 callersFunction_load_config
Load KEY=VALUE config file (bash-compatible).
python/krasis/launcher.py:521
↓ 2 callersMethod_load_config_screen
Show a scrolling list of .conf files in CWD. Returns True if a config was loaded.
python/krasis/launcher.py:1709
↓ 2 callersFunction_load_gutenberg_excerpt
Load a Gutenberg prompt excerpt from the canonical benchmarks/prompts/ dir.
python/krasis/stress_test.py:47
↓ 2 callersFunction_load_heatmap_prompts
Load heatmap calibration prompts from the prompts directory. Returns a list of prompt strings. Users can edit heatmap_prompts.txt to match t
python/krasis/server.py:396
↓ 2 callersFunction_load_qwen35_source_tensor
(model_dir: Path, layer: int, tensor_name: str)
python/krasis/hqq_self_calibrate.py:717
↓ 2 callersFunction_manifest_records_by_key
(manifest: Dict[str, Any])
python/krasis/vram_budget.py:306
↓ 2 callersFunction_manifest_tensor_names_by_layer
(entries: Dict[Tuple[int, str], Dict[str, Any]])
python/krasis/hqq_self_calibrate.py:1316
↓ 2 callersFunction_matches_any
(path: str, patterns: Sequence[str])
python/krasis/hf_downloader.py:313
↓ 2 callersMethod_memory_allocated_mb
(device: torch.device)
python/krasis/weight_loader.py:160
↓ 2 callersFunction_nearest_contract_state
( events: Sequence[Dict[str, Any]], *, before_lineno: Optional[int], )
tests/trace_diff.py:1302
↓ 2 callersFunction_normalized_quantized_output_summary
(entry: dict)
tests/test_hqq_rust_quantizer.py:1075
↓ 2 callersMethod_null_layer_gpu_weights
Null out GPU weight references on a layer to free VRAM.
python/krasis/model.py:4389
↓ 2 callersFunction_pack_uint4
(q: torch.Tensor)
python/krasis/attention_backend.py:1161
↓ 2 callersFunction_pack_uint6
(q: torch.Tensor)
python/krasis/attention_backend.py:1180
↓ 2 callersFunction_packet_equal
( expected_packet: Dict[str, Any], actual_packet: Dict[str, Any], *, ignore_fields: set[str],
tests/trace_diff.py:1074
↓ 2 callersFunction_packet_index_for_event_index
( packets: Sequence[Dict[str, Any]], event_index: int, )
tests/trace_diff.py:1092
↓ 2 callersFunction_packet_window
( packets: Sequence[Dict[str, Any]], packet_index: Optional[int], *, radius: int, )
tests/trace_diff.py:1112
↓ 2 callersFunction_pad_rows
(rows: List[torch.Tensor], *, dtype: torch.dtype, pad_value: float = 0.0)
python/krasis/hqq_self_calibrate.py:3240
↓ 2 callersFunction_parse_bool
(text: Any)
tests/trace_diff.py:214
↓ 2 callersFunction_parse_csv_strings
(value: str)
tests/test_hqq_rust_quantizer.py:1808
↓ 2 callersFunction_parse_input_row_full_line
(line: str)
python/krasis/hqq_self_calibrate.py:187
↓ 2 callersFunction_parse_int_list
(text: Any)
tests/trace_diff.py:251
↓ 2 callersFunction_parse_key_value_config
(path: Path)
tests/test_launcher_matrix.py:22
↓ 2 callersFunction_parse_prompt_conversations
Parse prompt lines into conversations. Lines starting with '- ' are continuations of the previous conversation (history is maintained). All o
python/krasis/chat.py:861
↓ 2 callersMethod_parse_results
Parse benchmark output for prefill and decode averages. Expected formats (from benchmark.py): ▸ Running prefill benchmark (20,644 t
python/krasis/suite.py:248
↓ 2 callersFunction_past_seen_tokens
(past_key_values: Any)
tests/generate_reference.py:1087
↓ 2 callersFunction_patch_one
(target: Any)
tests/generate_reference.py:1183
↓ 2 callersFunction_print_semantic_analysis
(analysis: Dict[str, Any])
tests/trace_diff.py:564
↓ 2 callersFunction_project_startup_calibration_probe_target
Project a safe next calibration probe using a measured or model-derived slope.
python/krasis/server.py:539
↓ 2 callersFunction_projection_reduction
(int8_projection: Dict[str, Any], hqq_projection: Dict[str, Any])
python/krasis/hqq_self_calibrate.py:1390
↓ 2 callersFunction_quality_relative_rmse
(record: dict)
python/krasis/attention_backend.py:612
↓ 2 callersFunction_quantize_int8_symmetric
(values: torch.Tensor)
python/krasis/hqq_self_calibrate.py:2822
↓ 2 callersFunction_quantize_int8_symmetric_rows
(values: torch.Tensor)
python/krasis/hqq_self_calibrate.py:2831
↓ 2 callersFunction_qvalue_saturation_by_group
(cache_dir: str, entry: Dict[str, Any])
python/krasis/hqq_self_calibrate.py:1015
↓ 2 callersMethod_rand_fp32
(self, shape: Tuple[int, ...], *, device: torch.device)
tests/decode_harness.py:138
↓ 2 callersFunction_ranked_pair_summary
( expected: Optional[Sequence[Tuple[int, float]]], actual: Optional[Sequence[Tuple[int, float]]], )
tests/trace_diff.py:357
↓ 2 callersMethod_read_and_dequant
Read a tensor, dequanting FP8 to BF16 if needed. FP8 models (e.g. Mistral 4) store weights as float8_e4m3fn with a companion weight_s
python/krasis/weight_loader.py:178
↓ 2 callersFunction_read_escape_sequence
Parse a terminal escape sequence after the initial ESC byte.
python/krasis/launcher.py:161
↓ 2 callersMethod_read_key_from_pty
(self, chunks)
tests/test_launcher_keys.py:11
↓ 2 callersMethod_read_tensor
Read a single tensor from safetensors by name.
python/krasis/weight_loader.py:172
↓ 2 callersFunction_real_case_routed_expert_indices
(real_case: dict)
tests/test_hqq_rust_quantizer.py:1826
↓ 2 callersFunction_reject_extra_subcommand_args
(command: str)
python/krasis/launcher.py:2928
↓ 2 callersFunction_render_prompt_card
Render a single prompt result card (shared between single and comparative reports).
tests/reference_test.py:1084
↓ 2 callersMethod_routed_expert_forward
Dispatch routed experts to Krasis CPU engine + shared expert on GPU. The Rust engine computes: routed_scaling_factor * Σ(w_i * ex
python/krasis/layer.py:834
↓ 2 callersFunction_routed_expert_tensor_specs_from_real_case
( real_case: dict, selected_tensor_names: list[str] | None = None, )
tests/test_hqq_rust_quantizer.py:271
↓ 2 callersFunction_run_hqq4_group_search_driver
( chunk: torch.Tensor, qmax: float, search_specs: list[tuple[torch.Tensor, torch.Tensor]], bes
python/krasis/attention_backend.py:1599
↓ 2 callersMethod_run_one
Run a single prompt through the model. Returns result dict.
python/krasis/stress_test.py:224
↓ 2 callersFunction_run_server_start_smoke
(config_path: Path, scenario: str, expected_fragments: list[str])
tests/test_launcher_matrix.py:101
↓ 2 callersFunction_runtime_entry_from_artifact
(entry: dict, artifact: dict)
tests/test_hqq_rust_quantizer.py:1083
↓ 2 callersFunction_save_hqq_attention_manifest_to_path
(path: str, manifest: dict)
python/krasis/attention_backend.py:983
↓ 2 callersFunction_save_safetensors_file
(tensors: dict, path: str, *, metadata: dict)
python/krasis/attention_backend.py:55
↓ 2 callersFunction_select_refit_patches
( refit_eval: Dict[str, Any], *, allowed_tensors: Optional[set] = None, allowed_methods: Optio
python/krasis/hqq_self_calibrate.py:4033
↓ 2 callersFunction_select_torch_cuda
Select the PyTorch CUDA wheel index for the visible GPUs. Returns (tag, version, error). The selected wheel is the minimum official PyTorch C
python/krasis/setup.py:167
↓ 2 callersFunction_semantic_mismatch_analysis
( comparison: Dict[str, Any], )
tests/trace_diff.py:541
↓ 2 callersFunction_sequential_f32_sum
(values: list[float])
tests/test_hqq_rust_quantizer.py:62
↓ 2 callersFunction_set_cache_mode
(model: Any, config: Any, use_cache_mode: str)
tests/generate_reference.py:449
↓ 2 callersFunction_sha256_file
(path: str)
python/krasis/server.py:175
↓ 2 callersFunction_sha256_file
(path: Path)
tests/generate_reference.py:140
↓ 2 callersFunction_sha256_json
(value: Any)
tests/generate_reference.py:363
↓ 2 callersMethod_shared_norm
(self, size: int)
tests/decode_harness.py:239
↓ 2 callersFunction_should_record_turn
(prompt_subset: Dict[str, Any], turn_idx: int)
tests/generate_reference.py:830
↓ 2 callersMethod_show_attention_unavailable
(self)
python/krasis/launcher.py:1444
↓ 2 callersFunction_sidecar_projection_metrics
( input_rows: torch.Tensor, cached_diff: torch.Tensor, correction: torch.Tensor, )
python/krasis/hqq_self_calibrate.py:2842
↓ 2 callersFunction_silu_and_mul
SiLU-and-mul. Input: [M, 2*N], output: [M, N]. Splits in half, applies silu(first) * second.
python/krasis/layer.py:51
↓ 2 callersFunction_solve_fixed_zero
(source: torch.Tensor, weights: torch.Tensor, zero: float, scale_seed: float, min_scale: float = 1e-8)
python/krasis/hqq_self_calibrate.py:2526
↓ 2 callersFunction_startup_diag_enabled
()
python/krasis/server.py:160
↓ 2 callersMethod_stream_attn_sync_prefetch
Sync DMA stream and point layer's attention to GPU buffers. buf_idx: 0 or 1 (ping-pong buffer index).
python/krasis/model.py:4349
↓ 2 callersFunction_summarize_events
(events: Sequence[Dict[str, Any]])
tests/trace_diff.py:1319
↓ 2 callersMethod_switch_strategy
Reinitialize GPU prefill managers with a new strategy. Args: expert_divisor: New strategy value, or None for pure CPU mode.
tests/archive/meta_optimiser.py:175
↓ 2 callersFunction_symmetric_params
(source: torch.Tensor)
python/krasis/hqq_self_calibrate.py:2521
↓ 2 callersFunction_teacher_forced_next_token_logits
(model: Any, input_ids: Any)
tests/reference_backfill_topk.py:466
↓ 2 callersFunction_tensor_bytes
(tensors: dict[str, torch.Tensor])
tests/test_hqq_rust_quantizer.py:364
↓ 2 callersFunction_tensor_error_metrics
(diff: torch.Tensor)
python/krasis/hqq_self_calibrate.py:1379
↓ 2 callersFunction_tensor_finiteness_stats
(tensor: Any)
tests/generate_reference.py:374
↓ 2 callersFunction_tensor_payload_bytes
(tensors: Dict[str, torch.Tensor])
python/krasis/attention_backend.py:511
↓ 2 callersFunction_to_moe_idx
(abs_layer)
python/krasis/model.py:529
↓ 2 callersFunction_tokenizer_metadata
(tokenizer: Any)
tests/reference_backfill_topk.py:333
↓ 2 callersFunction_top1_top2_margin
(entries: List[Dict[str, Any]])
tests/reference_test.py:639
↓ 2 callersMethod_truncate_content_to_tokens
Truncate content so that wrapping in chat template produces <= max_tokens. Uses binary search on content length since character-to-token rati
python/krasis/benchmark.py:283
↓ 2 callersFunction_turns
(reference: Dict[str, Any])
tests/reference_backfill_topk.py:101
↓ 2 callersFunction_unpack_uint4
(packed: torch.Tensor, cols: int)
python/krasis/attention_backend.py:1171
↓ 2 callersMethod_update_la_state_ptrs_aux
Re-register LA state pointers on all aux stores after prefill. Copies post-prefill conv/recur states from GPU0 to each aux GPU.
python/krasis/model.py:8685
← previousnext →1,501–1,600 of 12,380, ranked by callers