Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/brontoguana/krasis
/ functions
Functions
12,380 in github.com/brontoguana/krasis
⨍
Functions
12,380
◇
Types & classes
7,782
↳
Endpoints
10
↓ 11 callers
Function
raw_pointer_cast
src/cuda/flash_attn/cutlass/cute/pointer.hpp:361
↓ 11 callers
Method
reduce
src/cuda/flash_attn/cutlass/cutlass/epilogue/threadblock/epilogue.h:319
↓ 11 callers
Function
set_iteration_index
Overrides the internal iteration index
src/cuda/flash_attn/cutlass/cutlass/conv/threadblock/conv3d_fprop_filter_tile_access_iterator_analytic.h:151
↓ 11 callers
Function
synclog_mbarrier_bits
src/cuda/flash_attn/cutlass/cutlass/arch/synclog.hpp:275
↓ 11 callers
Function
tma_desc_commit_group
src/cuda/flash_attn/cutlass/cute/arch/copy_sm90_tma.hpp:1235
↓ 11 callers
Function
tma_desc_wait_group
Wait until all TMA descriptor previously issued are safe to be modified after tma_desc_commit_group()
src/cuda/flash_attn/cutlass/cute/arch/copy_sm90_tma.hpp:1263
↓ 11 callers
Function
validate_hqq_cache_nbits
(nbits: int)
python/krasis/attention_backend.py:293
↓ 11 callers
Function
write_baseline_manifest
(model_path: Path)
tests/test_hqq_self_calibrate.py:45
↓ 11 callers
Function
write_config
(path: Path, model_path: Path, attention_quant: str = "hqq4")
tests/test_hqq_self_calibrate.py:113
↓ 10 callers
Function
_cache_state_snapshot
(model: Any, config: Any)
tests/generate_reference.py:403
↓ 10 callers
Function
_finite_float_or_none
(value: Any)
tests/generate_reference.py:368
↓ 10 callers
Function
_l2norm
L2 normalize matching FLA library implementation.
python/krasis/linear_attention.py:139
↓ 10 callers
Method
_prepare_hqq_attention_cache
(self)
python/krasis/model.py:1792
↓ 10 callers
Method
_validate_hqq_attention_cache
(self)
python/krasis/model.py:2565
↓ 10 callers
Function
add_check
(name: str, ok: bool, detail: str)
tests/reference_contract.py:711
↓ 10 callers
Function
add_pointer_offset
Adds a pointer offset in units of Element
src/cuda/flash_attn/cutlass/cutlass/transform/threadblock/predicated_tile_access_iterator.h:505
↓ 10 callers
Method
add_pointer_offset
Helper to add an offset in number of elements, assuming this offset is divisible by the vector size.
src/cuda/flash_attn/cutlass/cutlass/subbyte_reference.h:1373
↓ 10 callers
Function
advance
Increment and return an instance to self.
src/cuda/flash_attn/cutlass/cutlass/conv/threadblock/predicated_scale_bias_vector_access_iterator.h:255
↓ 10 callers
Method
as_int4
Return as INT4 ref (panics if not INT4).
src/weights/mod.rs:303
↓ 10 callers
Function
build_prompt_tokens
Build a tokenized prompt of approximately target_tokens length. Uses a Gutenberg text, truncated via binary search on the tokenizer to hit th
tests/prompt_utils.py:45
↓ 10 callers
Function
calibration_cache_dir
(model_path: str, target_profile: str)
python/krasis/hqq_self_calibrate.py:314
↓ 10 callers
Function
can_implement
src/cuda/flash_attn/cutlass/cutlass/conv/collective/sm100_implicit_gemm_umma_warpspecialized.hpp:427
↓ 10 callers
Function
check_shared_mem
(arch: str = "none", tensor_idx: int = 0)
src/cuda/fla/utils.py:531
↓ 10 callers
Function
cluster_wait
src/cuda/flash_attn/cutlass/cute/arch/cluster_sm90.hpp:66
↓ 10 callers
Function
cp_async4_pred
src/cuda/marlin/marlin_vendor_common.h:91
↓ 10 callers
Function
fast_exp
src/cuda/flash_attn/cutlass/cutlass/fast_math.h:877
↓ 10 callers
Function
fast_max
src/cuda/flash_attn/cutlass/cutlass/fast_math.h:776
↓ 10 callers
Method
forward_attn
Attention-only forward: pre-norm → attention → post-norm. Returns (hidden, residual) ready for MoE input. Used by multi-GPU EP prefil
python/krasis/layer.py:266
↓ 10 callers
Method
from_model_path
(cls, model_path: str)
python/krasis/config.py:512
↓ 10 callers
Method
get_grid_shape
Computes the grid shape
src/cuda/flash_attn/cutlass/cutlass/gemm/device/gemv.h:105
↓ 10 callers
Method
get_k_tile_iterator
src/cuda/flash_attn/cutlass/cutlass/gemm/kernel/sm100_tile_scheduler.hpp:479
↓ 10 callers
Method
hidden_size
Hidden size of the model.
src/moe.rs:2088
↓ 10 callers
Function
load_and_quantize_expert
Load a BF16 expert's gate/up/down projections and quantize to INT4, INT8, or keep as BF16.
src/weights/mod.rs:6793
↓ 10 callers
Method
load_layer
Load all GPU weights for one layer. Args: device: Device for norms, gate, shared expert, dense MLP. attn_device: Devi
python/krasis/weight_loader.py:730
↓ 10 callers
Method
load_with_byte_offset
Loads a fragment from memory with additional logical offset
src/cuda/flash_attn/cutlass/cutlass/gemm/warp/mma_tensor_op_tile_iterator_sm80.h:2376
↓ 10 callers
Function
matmul_int4_avx2
Safe wrapper for the AVX2 INT4 matmul kernel.
src/kernel/avx2.rs:192
↓ 10 callers
Function
moe_forward
Full MoE forward for a single token on one layer. Pre-quantizes the BF16 activation to INT16 once, then runs all selected experts using the integer k
src/moe.rs:433
↓ 10 callers
Function
remove_marlin_cache_file
(path: &Path, reason: &str)
src/weights/mod.rs:1333
↓ 10 callers
Function
topk_indices
Find indices of top-k largest values via partial selection sort. For small k (e.g., 10) and moderate n (e.g., 512), this is faster than full sort.
src/decode.rs:1855
↓ 10 callers
Function
wrap
src/cuda/flash_attn/cutlass/cute/algorithm/tuple_algorithms.hpp:499
↓ 10 callers
Function
write_trace
(path: Path)
tests/test_hqq_self_calibrate.py:128
↓ 9 callers
Method
_load_hqq_attention_runtime_state
(self)
python/krasis/model.py:2693
↓ 9 callers
Function
_vram_checkpoint
Print VRAM usage at a checkpoint for diagnostics.
python/krasis/model.py:186
↓ 9 callers
Method
add_pointer_offset
Adds a pointer offset in units of Element
src/cuda/flash_attn/cutlass/cutlass/transform/threadblock/regular_tile_iterator_tensor_op.h:287
↓ 9 callers
Function
attention_quant_cache_nbits
(attention_quant: str)
python/krasis/attention_backend.py:299
↓ 9 callers
Function
compact_col_major
src/cuda/flash_attn/cutlass/cute/stride.hpp:373
↓ 9 callers
Function
consider
(zero_values: torch.Tensor, scale_seed: float)
tests/hqq_attention_diff.py:840
↓ 9 callers
Method
data
Returns the pointer to referenced data
src/cuda/flash_attn/cutlass/cutlass/tensor_ref.h:268
↓ 9 callers
Function
dot
src/cuda/flash_attn/cutlass/cutlass/arch/simd_sm60.h:96
↓ 9 callers
Function
expert_forward_unified
Compute a single expert's output using the CPU transposed format. Dispatches to INT4 or INT8 transposed kernels based on expert.num_bits. Uses combin
src/moe.rs:190
↓ 9 callers
Function
expert_matmul_int4_transposed_integer
( packed: *const u32, // [K/8, n_stride] weight_scales: *const u16, // [K/group_size, n_stride]
src/kernel/avx2.rs:1066
↓ 9 callers
Function
expert_matmul_int8_transposed_integer
( data: *const i8, // [K, n_stride] raw INT8 weights weight_scales: *const u16, // [K/group_
src/kernel/avx2.rs:1477
↓ 9 callers
Function
explode
src/cuda/flash_attn/cutlass/cute/arch/util.hpp:168
↓ 9 callers
Function
fence_barrier_init
Helps with visibility of barrier init operations across warps / cta / cluster Available as a separate function so as to batch inits across barriers an
src/cuda/flash_attn/cutlass/cutlass/arch/barrier.h:696
↓ 9 callers
Function
file_sha256
(path: Path)
tests/test_hqq_self_calibrate.py:344
↓ 9 callers
Method
fill
src/cuda/flash_attn/cutlass/cutlass/array.h:441
↓ 9 callers
Function
format_sse_token
Format an SSE chunk as OpenAI chat.completion.chunk JSON.
src/server.rs:609
↓ 9 callers
Method
fused_add_rmsnorm
Fused add + RMSNorm (in-place on both buffers). If first_call: residual = hidden, hidden = rmsnorm(residual) Else: residual += hidden, hidden = rmsno
src/decode.rs:766
↓ 9 callers
Function
generate_scale_perms
Generate scale permutation tables. Returns (scale_perm, scale_perm_single): - scale_perm: 64 elements, used when group_size < K - scale_perm_single:
src/weights/marlin.rs:402
↓ 9 callers
Function
get_compute_capability
src/cuda/flash_attn/fa2/hardware_info.h:32
↓ 9 callers
Function
hqq_auto_direct_edge_nbits
(attention_quant: str, budget_pct: Optional[float])
python/krasis/attention_backend.py:331
↓ 9 callers
Function
inner_partition
src/cuda/flash_attn/cutlass/cute/tensor_impl.hpp:976
↓ 9 callers
Method
is_source_needed
Returns true if source is needed based on state of runtime arguments
src/cuda/flash_attn/cutlass/cutlass/epilogue/thread/conversion_op.h:102
↓ 9 callers
Function
load
Loads a fragment from memory at the location pointed to by the iterator.
src/cuda/flash_attn/cutlass/cutlass/gemm/warp/mma_simt_tile_iterator.h:501
↓ 9 callers
Function
load_and_quantize_expert_ungated
Load and quantize an ungated expert (no gate_proj, just up_proj + down_proj). Returns (gate=empty, up, down) tuple compatible with ExpertWeights.
src/weights/mod.rs:6879
↓ 9 callers
Function
load_real_model_case
(model_path: str, layer_idx: int)
tests/test_hqq_fused_branch_runtime.py:407
↓ 9 callers
Function
make_tma_copy_A_sm90
src/cuda/flash_attn/cutlass/cute/atom/copy_traits_sm90_tma.hpp:1458
↓ 9 callers
Function
migrate_vec_to_node
Migrate a Vec's backing memory to a specific NUMA node. Returns true if the migration was successful.
src/numa.rs:384
↓ 9 callers
Method
mma_tail
Perform a Consumer Epilogue to release all buffers
src/cuda/flash_attn/cutlass/cutlass/gemm/collective/sm90_mma_tma_gmma_ss_warpspecialized.hpp:562
↓ 9 callers
Method
rmsnorm
Standalone RMSNorm (non-fused).
src/decode.rs:833
↓ 9 callers
Method
store
Stores a fragment to memory at the location pointed to by the iterator
src/cuda/flash_attn/cutlass/cutlass/conv/warp/mma_depthwise_simt_tile_iterator.h:565
↓ 9 callers
Method
to_bits
src/cuda/flash_attn/cutlass/cutlass/exmy_base.h:561
↓ 9 callers
Function
transform_layout
src/cuda/flash_attn/cutlass/cute/layout.hpp:731
↓ 9 callers
Function
validate_text_only_messages
(messages: &serde_json::Value)
src/text_only_messages.rs:1
↓ 9 callers
Method
with_shape
src/cuda/flash_attn/cutlass/cute/layout.hpp:204
↓ 8 callers
Function
_first_nested_diff
(left, right, path: str = "")
tests/test_hqq_rust_quantizer.py:1142
↓ 8 callers
Function
_float_delta_summary
(expected: Optional[float], actual: Optional[float])
tests/trace_diff.py:292
↓ 8 callers
Function
_projection_metrics
(input_rows: torch.Tensor, diff_group: torch.Tensor)
python/krasis/hqq_self_calibrate.py:2671
↓ 8 callers
Function
_ptr
Get raw CUDA pointer from tensor, or NULL.
python/krasis/marlin_utils.py:166
↓ 8 callers
Method
add_pointer_offset
Adds a pointer offset in units of Element
src/cuda/flash_attn/cutlass/cutlass/transform/threadblock/regular_tile_access_iterator_tensor_op_sm80.h:533
↓ 8 callers
Method
add_tile_offset
Adds a tile offset
src/cuda/flash_attn/cutlass/cutlass/transform/threadblock/regular_tile_iterator_tensor_op.h:293
↓ 8 callers
Method
add_tile_offset
Adds a tile offset
src/cuda/flash_attn/cutlass/cutlass/transform/threadblock/regular_tile_access_iterator_tensor_op_sm80.h:598
↓ 8 callers
Method
allocate
* Performs a non-blocking allocation of TMEM. * @param num_columns Number of columns being freed. Must be 32 <= num_columns <= 512 and power of 2.
src/cuda/flash_attn/cutlass/cute/arch/tmem_allocator_sm100.hpp:75
↓ 8 callers
Function
as_arithmetic_tuple
src/cuda/flash_attn/cutlass/cute/numeric/arithmetic_tuple.hpp:77
↓ 8 callers
Function
bf16_to_float
Convert BF16 bytes to float32 numpy array.
tests/test_moe_sanity.py:15
↓ 8 callers
Function
cache_path_marlin
Cache file path for Marlin format (GPU-native Marlin INT4/INT8).
src/weights/mod.rs:1246
↓ 8 callers
Function
candidate_from_info
(info: Any, *, include_files: bool = False)
python/krasis/hf_downloader.py:357
↓ 8 callers
Method
capacity
Compute the number of contiguous elements needed to store a tensor with the given size
src/cuda/flash_attn/cutlass/cutlass/layout/tensor_op_multiplicand_sm80.h:136
↓ 8 callers
Method
chat
Chat completion: format messages, generate, decode.
python/krasis/model.py:6573
↓ 8 callers
Method
clear_mask
Clears the predicate set efficiently
src/cuda/flash_attn/cutlass/cutlass/transform/threadblock/predicated_tile_access_iterator.h:257
↓ 8 callers
Function
cluster_arrive_relaxed
src/cuda/flash_attn/cutlass/cute/arch/cluster_sm90.hpp:48
↓ 8 callers
Function
cluster_shape
Returns the dim3 cluster shape.
src/cuda/flash_attn/cutlass/cute/arch/cluster_sm90.hpp:140
↓ 8 callers
Function
dequant_fp8_to_bf16
Dequantize a slice of FP8 E4M3 bytes to BF16 u16 values, applying a per-tensor scale.
src/weights/mod.rs:6186
↓ 8 callers
Function
dequantize_int4
Dequantize INT4 packed weights back to f32 for verification.
src/weights/marlin.rs:218
↓ 8 callers
Function
detect_expert_prefix
Auto-detect the expert weight prefix from the weight map. Returns "model" for Qwen3/V2-Lite or "language_model.model" for Kimi K2.5.
src/weights/mod.rs:6073
↓ 8 callers
Function
die
(msg: str)
tests/validate_model.py:114
↓ 8 callers
Function
domain_offset
src/cuda/flash_attn/cutlass/cute/layout.hpp:717
↓ 8 callers
Method
ell_add_mask
add mask for small tiles in ELL
src/cuda/flash_attn/cutlass/cutlass/transform/threadblock/ell_predicated_tile_iterator.h:865
↓ 8 callers
Method
enable_mask
Clears the predicate set efficiently
src/cuda/flash_attn/cutlass/cutlass/transform/threadblock/predicated_tile_access_iterator.h:267
↓ 8 callers
Method
ensure_capacity
Ensure we have enough pages for new_tokens more tokens.
python/krasis/kv_cache.py:436
← previous
next →
501–600 of 12,380, ranked by callers