MCPcopy Create free account

hub / github.com/Avarok-Cybersecurity/atlas / functions

Functions7,049 in github.com/Avarok-Cybersecurity/atlas

↓ 7 callersFunctionupload
(gpu: &dyn GpuBackend, b: &[u8])
crates/spark-model/examples/gdn_regresident_microtest.rs:55
↓ 7 callersFunctionw4a16_gemv_batch2
W4A16 double-GEMV (M=2): reads weights once, computes 2 outputs. A: [2, K] BF16 contiguous, B: NVFP4 packed, C: [2, N] BF16 contiguous. Same weight b
crates/spark-model/src/layers/ops/quant_dispatch.rs:124
↓ 7 callersMethodwith_stop_tokens
(mut self, stop_tokens: &[u32])
crates/spark-server/src/grammar/state.rs:113
↓ 7 callersFunctionwrite_lqer_bytes
Serialise an `LqerCorrection` to the `.lqer` on-disk format. Used by the offline calibration tool and round-trip tests.
crates/spark-server/src/lqer.rs:275
↓ 7 callersFunctionyarn_rope_mscale
Compute the YaRN `_mscale` ratio that DeepSeek folds into the rope cos/sin: `get_mscale(factor, mscale) / get_mscale(factor, mscale_all_dim)`. Returns
crates/spark-model/src/layers/qwen3_attention/helpers.rs:24
↓ 7 callersMethodzero_all
Zero all reusable buffers to eliminate stale data between requests. Ensures deterministic computation regardless of request history.
crates/spark-runtime/src/buffers.rs:460
↓ 6 callersMethod_get_layer_params
(self, layer: torch.nn.Module, **kwargs)
bench/fp8_dgx2_drift/vllm_src/scaled_mm_BlockScaledMMLinearKernel.py:72
↓ 6 callersFunction_mk
(name)
bench/mamba_ssm_stub.py:49
↓ 6 callersMethodadd_fsm
Splice `other` into `self`, offsetting all of `other`'s state ids. Returns the state mapping `other_id -> new_id`.
crates/xgrammar/src/fsm/fsm.rs:142
↓ 6 callersMethodadd_typed_edge
Add a raw typed edge (`type` is one of [`edge_type`], `value` goes into `max`).
crates/xgrammar/src/fsm/fsm.rs:100
↓ 6 callersFunctionadvance_layer_cursors_after_slide
Issue #31: after a successful slide advances `window_start` to `new_window_start`, advance every attention layer's offload cursor to keep pace. Layers
crates/spark-model/src/model/block_mgmt.rs:170
↓ 6 callersMethodalloc_managed
(&self, bytes: usize)
crates/spark-runtime/src/gpu/mock.rs:96
↓ 6 callersMethodallocate_rule_name
Allocate a unique rule name based on `hint`, returning the name actually assigned. Port of `AllocateRuleName`.
crates/xgrammar/src/schema/script.rs:32
↓ 6 callersMethodapply_chat_template
Legacy apply_chat_template for callers that pass (role, content) tuples. Converts to JSON messages and delegates to apply_chat_template_jinja.
crates/spark-server/src/tokenizer/chat_impl.rs:245
↓ 6 callersMethodargmax_on_device
(&self, logits_ptr: DevicePtr, _stream: u64)
crates/spark-model/src/model/trait_impl/mod.rs:176
↓ 6 callersMethodassign
Reserve a slot for `key`. If the pool is full, picks an evictable slot from `evict_candidates` (callers pass them in score-ascending order; the lowest
crates/spark-storage/src/scratch_pool.rs:127
↓ 6 callersFunctionbackfill_required_params
(calls: &mut [ToolCall], tools: &[ToolDefinition])
crates/spark-server/src/tool_parser/validation.rs:127
↓ 6 callersMethodbegin_capture
Begin capturing CUDA operations on `stream` into a graph. All kernel launches and async copies on this stream between `begin_capture` and `end_captur
crates/spark-runtime/src/gpu.rs:233
↓ 6 callersFunctionbench_one
(tag: &str, loader: L, dir: &Path, cold: bool)
crates/spark-runtime/benches/bench_fast_weights.rs:58
↓ 6 callersFunctionbf16_bits_to_f32
(b: u16)
crates/spark-model/examples/inferspark_attn_microtest.rs:41
↓ 6 callersFunctionbf16_gemm_act_weight_t
( act: u64, weight: u64, out: u64, m: u32, n: u32, k: u32, stream: u64, )
crates/spark-runtime/src/cutlass/gemm.rs:14
↓ 6 callersFunctionbf16_to_f32
(b: u16)
crates/spark-model/examples/moe_blend_microtest.rs:29
↓ 6 callersFunctionbf16_to_fp8
Convert BF16 activations to FP8 E4M3 for FP8×FP8 GEMM. Grid: (ceil(total_elements/2 / 256), 1, 1) Block: (256, 1, 1)
crates/spark-model/src/layers/ops/gemm_dense.rs:460
↓ 6 callersMethodblock_bytes_dims
Bytes per block (K or V, not both) for a specific dtype and (num_kv_heads, head_dim) pair. Per-layer callers pass their layer's actual dimensions; hom
crates/spark-runtime/src/kv_cache.rs:225
↓ 6 callersMethodbroadcast
(&self, _ptr: u64, _bytes: usize, _root: usize)
crates/spark-comm/src/lib.rs:173
↓ 6 callersFunctionbuild_layer_kv_dtypes
( kv_dtype: spark_runtime::kv_cache::KvCacheDtype, num_attention_layers: usize, high_precision_lay
crates/spark-server/src/main_modules/kv_dtypes.rs:47
↓ 6 callersFunctionbuild_ptr_table_from_qw
Build a device-side pointer table from pre-transposed QuantizedWeight vec.
crates/spark-model/src/layers/moe/mod.rs:372
↓ 6 callersFunctionbump_f12_tool_call_count
Bump the per-response tool-call counter and trip `stop_string_triggered` when the cap is exceeded. Catches pathological responses emitting dozens of t
crates/spark-server/src/api/stream_guards.rs:26
↓ 6 callersFunctionchar_to_utf8
Encode a codepoint into UTF-8 bytes. Faithful to C++ `CharToUTF8`: it does not validate surrogates and produces 1–4 bytes for codepoints in `0..=0x10
crates/xgrammar/src/support/encoding.rs:33
↓ 6 callersMethodcheck
Check whether `sentence` is a near-duplicate of any sentence already in the ring. Returns `true` on duplicate. Always pushes the new bigram-set into t
crates/spark-server/src/loop_simhash.rs:82
↓ 6 callersFunctioncheck_loop_watchdog
Detect a repeating line or long phrase in the post-detector content buffer. Returns true when the last non-trivial line occurs (fuzzy-matched on colla
crates/spark-server/src/api/stream_guards.rs:44
↓ 6 callersMethodcompile_json_schema
Compile a grammar that enforces a JSON schema.
crates/spark-server/src/grammar/compile_misc.rs:53
↓ 6 callersMethodcompile_structural_tag_raw
Build and compile a structural tag grammar from raw JSON components. This bypasses xgrammar-rs's `compile_structural_tag` wrapper to access `at_least_
crates/spark-server/src/grammar/compile_misc.rs:13
↓ 6 callersFunctioncompute_session_hash
Compute a session hash from tokenized prompt. Hashes up to 1024 tokens — covers the full system prompt + first user message for most clients (Claude C
crates/spark-server/src/session_manager.rs:133
↓ 6 callersMethodcontains
Whether `element` is present.
crates/xgrammar/src/support/union_find.rs:46
↓ 6 callersMethodcreate
(dir: &Path, spec: GroupLayout)
crates/spark-storage/src/layout.rs:27
↓ 6 callersMethodcreate_file
Create a new swap file. Returns `(id, buffered_writer)`.
crates/spark-runtime/src/kv_spill.rs:48
↓ 6 callersMethoddecode
(&self, _token: u32, seq: &mut SequenceState, _stream: u64)
crates/spark-model/src/engine/tests.rs:119
↓ 6 callersMethoddecode_multi_seq
( &self, hidden: DevicePtr, residual: DevicePtr, num_seqs: usize, stat
crates/spark-model/src/layers/qwen3_ssm/mod.rs:261
↓ 6 callersMethoddecode_rollback_ring_slots
Number of decode-rollback SSM snapshot slots reserved **per active sequence** (Phase-C). The scheduler's per-sequence snapshot ring is sized from this
crates/spark-model/src/traits/model.rs:287
↓ 6 callersMethoddecoded_vocab
Decoded token bytes, indexed by token id (length `vocab_size`).
crates/xgrammar/src/tokenizer/info.rs:170
↓ 6 callersFunctiondense_gemv_fp8w
Dense FP8-weight GEMV (M=1): C = A @ (dequant(B_fp8) * row_scale). A: `[1, K]` BF16, B: `[N, K]` FP8 E4M3, row_scale: `[N]` f32, C: `[1, N]` BF16. Ha
crates/spark-model/src/layers/ops/gemm_quant.rs:176
↓ 6 callersFunctiondequant_fp8_to_bf16_into
Dequantize FP8 E4M3 → BF16, writing into a pre-allocated destination buffer. Avoids gpu.alloc/free for the intermediate BF16 data. The caller provide
crates/spark-model/src/weight_map/model_a.rs:467
↓ 6 callersFunctiondev
(data: &[T])
crates/spark-runtime/src/flashinfer.rs:273
↓ 6 callersFunctiondn_f32
(g: &dyn GpuBackend, p: DevicePtr, n: usize)
crates/spark-model/examples/gdn_verify_fused_microtest.rs:86
↓ 6 callersFunctiondocker_stop
(name, host=None)
scripts/dev/overnight_marathon.py:89
↓ 6 callersFunctiondrive_chunked
Feed `text` to the detector in `chunk`-byte slices (ASCII fixtures), then flush — exercises cross-chunk tag reassembly like the live token stream.
crates/spark-server/src/tool_parser/tests/group_g_parallel.rs:75
↓ 6 callersMethodend_capture
End capture and return an instantiated graph ready for replay.
crates/spark-runtime/src/gpu.rs:238
↓ 6 callersFunctionensure_blocks_through_prefill
Phase 6.3 — Sliding-window allocation helper (prefill path). Same as `ensure_blocks_through_decode` but with a prefix-cache eviction fallback: if `kv
crates/spark-model/src/model/block_mgmt.rs:337
↓ 6 callersFunctionepsilon_closure
Compute the epsilon closure of `state_set` in place over `edges`. The set is *not* cleared — every state already present plus every state reachable f
crates/xgrammar/src/fsm/traversal.rs:21
↓ 6 callersFunctionescape_dot_for_regex
Escape the regex-significant `.` in a formatted-float boundary string so it is treated as a literal decimal point rather than the wildcard. Port of `E
crates/xgrammar/src/schema/float_regex.rs:30
↓ 6 callersFunctionexec_tool_def
()
crates/spark-server/src/grammar/tests/qwen3_coder_required.rs:29
↓ 6 callersMethodfd
(&self, layer: u32)
crates/spark-storage/src/layout.rs:80
↓ 6 callersFunctionfinish_sequence
Send final response and free GPU resources for a completed sequence.
crates/spark-server/src/scheduler/lifecycle.rs:8
↓ 6 callersFunctionflatten_content
Flatten Anthropic message content blocks into a single text string. For assistant messages with tool_use blocks, also extracts tool calls so they can
crates/spark-server/src/anthropic/convert.rs:10
↓ 6 callersFunctionflush_content_sanitizer
Flush anything held in the streaming sanitizer's tail buffer at stream end. Drops content if tag-suppression is still active (no close arrived) or if
crates/spark-server/src/api/stream_guards.rs:130
↓ 6 callersFunctiong
(ebnf: &str)
crates/xgrammar/src/grammar/functor/constructor.rs:133
↓ 6 callersFunctiongated_rms_norm
Gated RMS norm (norm_before_gate=False, per-group): output = rms_norm_per_group(input * silu(gate), weight, group_size) Kernel: `gated_rms_norm(input
crates/spark-model/src/layers/ops/norm.rs:152
↓ 6 callersMethodgemv
(&self, gpu: &dyn GpuBackend, x: DevicePtr, y: DevicePtr, stream: u64)
crates/spark-model/src/forward/quant_weights.rs:126
↓ 6 callersMethodgenerate_from_spec
Dispatch to the per-kind generator. Port of `GenerateFromSpec`.
crates/xgrammar/src/schema/converter.rs:359
↓ 6 callersMethodget
Fetch a snapshot of the conversation. TTL-expired entries are evicted and return None.
crates/spark-server/src/conversation_store.rs:129
↓ 6 callersFunctionget_bit
(words: &[i32], token: usize)
crates/xgrammar/src/matcher/bitmask.rs:46
↓ 6 callersFunctionhc_pre
( gpu: &dyn GpuBackend, kernel: KernelHandle, streams: DevicePtr, hc_fn: DevicePtr, hc_sca
crates/spark-model/src/layers/ops/hyper_connection.rs:39
↓ 6 callersMethodhigh_speed_swap_engaged
( &self, kv_cache: &spark_runtime::kv_cache::PagedKvCache, )
crates/spark-model/src/layers/qwen3_attention/decode/high_speed_swap.rs:20
↓ 6 callersFunctionindexed_trace
(kind, idx) trace of the indexed detector events, in emission order. `kind` ∈ {"start", "end", "call"} — fragments/deltas are asserted separately via
crates/spark-server/src/tool_parser/tests/group_g_parallel.rs:18
↓ 6 callersMethodinner
Returns a borrowed reference to the underlying HF tokenizer (for callers that need to drive low-level encode/decode directly).
crates/spark-server/src/tokenizer/chat_impl.rs:70
↓ 6 callersMethodinsert_intermediate_snapshot
( &self, tokens: &[u32], _block_table: &[u32], _disk_block_ids: &[u32],
crates/spark-runtime/src/radix_tree.rs:149
↓ 6 callersFunctionintset_intersection
Replace `lhs` with the sorted intersection of `lhs` and `rhs`. Both inputs must already be sorted ascending. As a special case, `lhs == [-1]` is trea
crates/xgrammar/src/support/int_set.rs:47
↓ 6 callersMethodis_empty
True if no states are pending.
crates/xgrammar/src/earley/queue.rs:70
↓ 6 callersMethodis_ep
Check whether expert parallelism (EP) is enabled (multi-GPU MoE). When true, the scheduler must use separate decode + prefill commands with explicit
crates/spark-model/src/traits/model.rs:516
↓ 6 callersMethodis_token_allowed
Check if a specific token is allowed by the current bitmask.
crates/spark-server/src/grammar/state.rs:169
↓ 6 callersMethodlen
(&self)
crates/spark-server/src/conversation_store.rs:241
↓ 6 callersMethodlm_head_batched
LM head for K tokens: hidden[K, H] → logits[K, V].
crates/spark-model/src/model/impl_a3.rs:72
↓ 6 callersMethodmamba2_d_inner
Mamba-2 d_inner = mamba_num_heads * mamba_head_dim.
crates/atlas-core/src/config/methods.rs:238
↓ 6 callersMethodnext_u64
(&mut self)
crates/spark-model/examples/w4a16_bf16_v2_bench.rs:20
↓ 6 callersFunctionnormed
(ebnf: &str)
crates/xgrammar/src/grammar/functor/analyzer_tests.rs:6
↓ 6 callersFunctionnormed
(ebnf: &str)
crates/xgrammar/src/grammar/functor/lookahead.rs:138
↓ 6 callersFunctionnormed
(ebnf: &str)
crates/xgrammar/src/grammar/functor/optimizer_tests.rs:7
↓ 6 callersMethodnum_history_steps
Number of actual matcher history steps (== tokens `rollback` can undo). BUG#3 (2026-06-02): `accept_token` returns `true` for stop/EOS tokens and in
crates/spark-server/src/grammar/state.rs:310
↓ 6 callersMethodobserve
Observe is a no-op for prompt lookup (the history IS the cache).
crates/spark-server/src/ngram.rs:81
↓ 6 callersFunctionoptimized
Parse + normalize + optimize an EBNF grammar — the same pipeline `GrammarCompiler::compile_normalized` runs before compilation.
crates/xgrammar/src/compiler/decompose_unit_tests.rs:14
↓ 6 callersFunctionparse_lqer_bytes
Parse a single `.lqer` file's bytes into an `LqerCorrection`. Pure / no I/O — exposed for testing the format independently of the filesystem.
crates/spark-server/src/lqer.rs:193
↓ 6 callersFunctionparse_minimax_xml_call
Parse MiniMax XML inner content: `<invoke name="NAME"><parameter name="K">V</parameter>...</invoke>`. The outer `<minimax:tool_call>` wrapper is alre
crates/spark-server/src/tool_parser/parse_single_a.rs:97
↓ 6 callersFunctionparse_quantization_config
(raw: &serde_json::Value)
crates/atlas-core/src/config/parsers/quantization.rs:12
↓ 6 callersFunctionpercentile
(data: list, p: float)
bench/bench-atlas-concurrency.py:69
↓ 6 callersMethodprefill_chunk
( &self, tokens: &[u32], seq: &mut SequenceState, chunk_start: usize,
crates/spark-model/src/model/trait_impl/mod.rs:58
↓ 6 callersMethodprune
Remove every provably-dead state from `states` in place. A pure optimization: the retained set parses exactly the same language. No-ops when pruning i
crates/xgrammar/src/earley/prune.rs:111
↓ 6 callersMethodq_only
(&self)
crates/spark-model/src/forward/qwen3_5/mod.rs:104
↓ 6 callersMethodr
(&mut self, lo: f64, hi: f64)
crates/spark-model/examples/gdn_split4_microtest.rs:26
↓ 6 callersMethodr
(&mut self, lo: f32, hi: f32)
crates/spark-model/examples/gdn_strided_norm_microtest.rs:37
↓ 6 callersMethodr
(&mut self, lo: f64, hi: f64)
crates/spark-model/examples/gdn_wy_verify_microtest.rs:46
↓ 6 callersFunctionrandom_bf16
(n: usize, rng: &mut ChaCha8Rng)
crates/spark-storage/tests/common/mod.rs:30
↓ 6 callersFunctionrd
3rdparty_patches/gdn_aot/gdn_harness_packed.cpp:9
↓ 6 callersFunctionrd
(p:&str)
3rdparty_patches/gdn_aot/gdn_rs.rs:18
↓ 6 callersFunctionrd
(p: &str)
crates/spark-model/examples/gdn_fla_vs_fi.rs:13
↓ 6 callersFunctionrd
(p)
bench/nemotron_layer_diff.py:25
↓ 6 callersMethodreadback_bf16
Read back first `n` BF16 values from device and return as f32 + L2 norm.
crates/spark-model/src/model/impl_b1.rs:212
↓ 6 callersMethodreclaim_from_cache
Try to reclaim a snapshot slot by evicting the LRU snapshot from the prefix cache's snapshot index. Snapshots are decoupled from tree nodes, so this d
crates/spark-model/src/model/ssm_snapshot.rs:422
↓ 6 callersFunctionregex_body
Convert a regex to an EBNF body, mapping converter errors into a [`SchemaError`]. `with_rule_name = false` matches the C++ `RegexToEBNF(..., false)` c
crates/xgrammar/src/schema/gen_scalar.rs:21
↓ 6 callersMethodreset_call_state
Clear the per-tool-call incremental-streaming bookkeeping (called after each call closes and on `reset`). Does NOT touch `tools`/`buffer_args`.
crates/spark-server/src/tool_parser/streaming_impl.rs:46
← previousnext →601–700 of 7,049, ranked by callers