Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Avarok-Cybersecurity/atlas
/ functions
Functions
7,049 in github.com/Avarok-Cybersecurity/atlas
⨍
Functions
7,049
◇
Types & classes
847
↓ 21 callers
Method
qkv_output
(&self)
crates/spark-runtime/src/buffers.rs:229
↓ 21 callers
Function
test_config
()
crates/spark-runtime/src/kv_cache/tests.rs:10
↓ 20 callers
Function
add_same_length_range
Decompose `[min, max]` of packed UTF-8 values of the *same byte length* into byte-range edges from state `from` to state `to`.
crates/xgrammar/src/grammar/functor/char_range_same_len.rs:12
↓ 20 callers
Method
default_stream
Return the default CUDA stream handle.
crates/spark-model/src/traits/model.rs:707
↓ 20 callers
Method
detach
Detach `idx` from the reference graph.
crates/xgrammar/src/grammar/functor/fsm_hasher.rs:112
↓ 20 callers
Method
ep_broadcast_cmd
EP broadcast: send a command (u32) to all worker ranks. Called by rank 0 before each model operation to synchronize workers. Only valid when EP is en
crates/spark-model/src/traits/model.rs:560
↓ 20 callers
Method
ep_broadcast_cmd_for_seq
EP broadcast: send a `(seq_id, cmd)` pair to all worker ranks. Use this at the *first* broadcast of a logical command sequence (e.g. the K=2 verify m
crates/spark-model/src/traits/model.rs:576
↓ 20 callers
Function
find
Look up `key` in an ordered object slice.
crates/xgrammar/src/structural_tag/parser.rs:129
↓ 20 callers
Function
key
(hash: u64, node: i32)
crates/xgrammar/src/compiler/rule_cache_tests.rs:23
↓ 20 callers
Function
optimized
Optimize a structural-tag grammar so the Earley parser can run.
crates/xgrammar/src/structural_tag/tests.rs:17
↓ 20 callers
Function
quantized_any
Load a quantized weight, dispatching by variant. Handles all three on-disk formats including FP8 block-scaled (requires dimensions for FP8→BF16→NVFP4
crates/spark-model/src/weight_map/nvfp4_detect.rs:218
↓ 20 callers
Function
sanitize_schema_for_grammar
Sanitize a JSON schema to prevent xgrammar's C++ EBNF parser from crashing. XGrammar's `json_schema_converter.cc` can produce empty EBNF rule bodies
crates/spark-server/src/grammar/schema.rs:109
↓ 20 callers
Function
w8a16_gemv
( gpu: &dyn GpuBackend, kernel: KernelHandle, input: DevicePtr, weight: DevicePtr, row_sca
crates/spark-model/src/layers/ops/gemm_quant.rs:208
↓ 19 callers
Method
add_grammar_expr
Append a raw `(type, data[])` expression to the CSR store and return its expr id.
crates/xgrammar/src/grammar/builder.rs:142
↓ 19 callers
Function
assert_json_eq
(actual: &str, expected: &str, ctx: &str)
crates/spark-server/src/tool_parser/tests/group_g_parallel.rs:66
↓ 19 callers
Method
copy_d2h_on_stream
(&self, src: DevicePtr, dst: &mut [u8], stream: u64)
crates/spark-runtime/src/metal_backend.rs:330
↓ 19 callers
Function
cuEventCreate
── events ────────────────────────────────────────────────────────────
crates/atlas-kernels/hip/libcuda_hip_shim.cpp:73
↓ 19 callers
Function
cuEventDestroy_v2
crates/atlas-kernels/hip/libcuda_hip_shim.cpp:74
↓ 19 callers
Function
cuEventRecord
crates/atlas-kernels/hip/libcuda_hip_shim.cpp:75
↓ 19 callers
Function
hash_combine_binary
Mix `value` into `seed` in place. Faithful to C++ `HashCombineBinary` — the boost `hash_combine` 64-bit mixing step. Uses wrapping arithmetic to matc
crates/xgrammar/src/support/hash.rs:27
↓ 19 callers
Method
is_terminated
Whether the grammar has been fully matched (all required structure generated).
crates/spark-server/src/grammar/state.rs:270
↓ 19 callers
Method
sorted_decoded_vocab
`(id, token)` pairs sorted lexicographically by token bytes, excluding stop and special tokens.
crates/xgrammar/src/tokenizer/info.rs:186
↓ 19 callers
Function
vision_tensor_dense_auto
( store: &WeightStore, name: &str, gpu: &dyn GpuBackend, )
crates/spark-model/src/weight_loader/qwen35.rs:35
↓ 18 callers
Method
add_rule
Add a rule with a unique name derived from `hint`.
crates/xgrammar/src/structural_tag/converter.rs:107
↓ 18 callers
Method
add_rule
Allocate a name from `hint` and add the rule in one step. Returns the actual rule name. Port of `AddRule`.
crates/xgrammar/src/schema/script.rs:64
↓ 18 callers
Function
build
(re: &str)
crates/xgrammar/src/fsm/mod.rs:54
↓ 18 callers
Function
build
(re: &str)
crates/xgrammar/src/fsm/builder/regex_tests.rs:8
↓ 18 callers
Function
detect
Returns the refusal sentence when `content` opens with one of the known patterns, else `None`. The returned sentence is the first sentence (truncated
crates/spark-server/src/refusal.rs:54
↓ 18 callers
Function
detect_metadata_from_hf
Detect [`HfMetadata`] from the raw text of a `tokenizer.json`. Returns `Err` only when `backend_str` is not parseable JSON or is not a JSON object —
crates/xgrammar/src/tokenizer/hf_metadata.rs:50
↓ 18 callers
Method
fill_next_token_bitmask
Fill `bitmask` with the set of tokens acceptable for the next decode position. `index` selects the matcher's slice when the caller batches several ma
crates/xgrammar/src/matcher/fill.rs:42
↓ 18 callers
Function
gpu_sync
Synchronize the stream.
crates/atlas-spark-bench/src/gpu.rs:61
↓ 18 callers
Method
is_empty
True when there are no rows.
crates/xgrammar/src/fsm/compact_array.rs:41
↓ 18 callers
Function
normalize_tool_name
Lowercase and collapse runs of `_` / `-` to a single `_`, trimming leading and trailing underscores. Used by fuzzy tool-name repair to match across se
crates/spark-server/src/tool_parser/fuzzy_match.rs:88
↓ 18 callers
Method
num_elements
(&self)
crates/spark-runtime/src/weights.rs:80
↓ 18 callers
Function
probe
(spec: ModelSpec, base_url: str, data_url: str)
tests/vision_sweep.py:185
↓ 18 callers
Function
shard_dense_bf16
Shard a BF16 dense weight `[out_dim, in_dim]` according to `kind`. Returns `(sharded_ptr, sharded_out, sharded_in)`. When `tp_size == 1` or `kind ==
crates/spark-model/src/tp_shard.rs:57
↓ 18 callers
Function
silu_mul
Fused SiLU activation: output = SiLU(gate) * up. Kernel: `silu_mul_separate(gate, up, output, n)` Grid: (ceil(n/256), 1, 1) Block: (256, 1, 1)
crates/spark-model/src/layers/ops/activations.rs:20
↓ 18 callers
Method
tokens_have_vision_pad
Per-vision-pad-token-id helper. Vision prompts splice ViT embeddings into placeholder `<|image_pad|>` token positions; the hashed token-ID stream ther
crates/spark-model/src/model/impl_a2.rs:42
↓ 18 callers
Method
vocab_size
(&self)
crates/xgrammar/src/matcher/bitmask.rs:94
↓ 17 callers
Method
add_epsilon_edge
Add an epsilon transition.
crates/xgrammar/src/fsm/fsm.rs:105
↓ 17 callers
Method
check
(self, name: str, passed: bool, detail: str = "")
scripts/dev/coherence_test.py:87
↓ 17 callers
Method
is_empty
True if no weights are loaded.
crates/spark-runtime/src/weights.rs:126
↓ 17 callers
Method
json
Construct an [`StructuralTagError::InvalidJson`].
crates/xgrammar/src/structural_tag/error.rs:31
↓ 17 callers
Function
launch
Launch a kernel with raw parameters. # Safety `params` must contain valid pointers matching the kernel signature.
crates/atlas-spark-bench/src/gpu.rs:85
↓ 17 callers
Function
make_module_hook
(out_dir: pathlib.Path, layer_idx: int, op_name: str)
bench/fp8_dgx2_drift/hf_op_dump.py:84
↓ 17 callers
Method
parse
Parse `schema` into a spec. `rule_name_hint` seeds the EBNF rule name; `default_type` is applied when no `type` keyword is present (used by `propertyN
crates/xgrammar/src/schema/parser.rs:46
↓ 17 callers
Method
raw_stream
Get the raw CUstream handle for Atlas's own stream.
crates/atlas-core/src/registry.rs:273
↓ 16 callers
Function
_has_degeneration
Check text for common degeneration signals. Returns (bool, detail).
scripts/test_coherence.py:813
↓ 16 callers
Function
bench_kernel_ms
Measure kernel execution time in milliseconds using CUDA events. Runs `warmup` warmup iterations, then `iters` timed iterations, returning the minimum
crates/atlas-spark-bench/src/gpu.rs:106
↓ 16 callers
Method
block_stride_bytes_for_layer
Block stride in bytes for a specific attention layer. For symmetric dtypes returns the K stride (which equals V). For asymmetric dtypes returns the K-
crates/spark-runtime/src/kv_cache/paged_impl.rs:371
↓ 16 callers
Function
emit
( tx: &tokio::sync::mpsc::Sender<Result<axum::response::sse::Event, std::convert::Infallible>>, ev: &c
crates/spark-server/src/api/responses_translate.rs:46
↓ 16 callers
Method
extract_thinking
(&self, text: &str, enable_thinking: bool)
crates/spark-server/src/reasoning_parser/parsers.rs:80
↓ 16 callers
Function
get_kernel
Look up a kernel function handle with caching.
crates/atlas-spark-bench/src/gpu.rs:70
↓ 16 callers
Method
is_char_range
True if this is a character-range edge.
crates/xgrammar/src/fsm/edge.rs:54
↓ 16 callers
Method
is_rule_ref
True if this is a rule reference.
crates/xgrammar/src/fsm/edge.rs:64
↓ 16 callers
Function
print_grammar
Convenience: render `grammar` as EBNF text.
crates/xgrammar/src/grammar/printer.rs:170
↓ 16 callers
Function
small_tokenizer
A tiny RAW-vocab tokenizer covering the bytes used in the test grammars: single ASCII chars plus a few multi-char tokens.
crates/xgrammar/src/compiler/tests/mod.rs:28
↓ 16 callers
Method
to_compact
Sort edges and pack into the CSR [`CompactFsm`] form.
crates/xgrammar/src/fsm/compact.rs:154
↓ 16 callers
Function
tokenize
POST /tokenize — tokenize text or chat messages, return token IDs and count.
crates/spark-server/src/api/misc_handlers.rs:149
↓ 16 callers
Function
unix_timestamp
()
crates/spark-server/src/openai/mod.rs:31
↓ 16 callers
Method
world_size
(&self)
crates/spark-comm/src/lib.rs:193
↓ 15 callers
Method
all_reduce_async
Async all-reduce using GPU-side event synchronization. Replaces `gpu.synchronize(stream) + all_reduce(ptr, bytes)`. Uses a dedicated comm stream + CU
crates/spark-comm/src/lib.rs:54
↓ 15 callers
Method
argmax_on_device
(&self, logits_ptr: DevicePtr, _stream: u64)
crates/spark-model/src/engine/tests.rs:173
↓ 15 callers
Function
build
Build the boxed parser for a [`ReasoningFormat`].
crates/spark-server/src/reasoning_parser/parsers.rs:15
↓ 15 callers
Function
check
Convert and assert exact equality with `expected`.
crates/xgrammar/src/schema/tests.rs:55
↓ 15 callers
Method
comm_ref
(&self)
crates/spark-model/src/model/impl_a2.rs:31
↓ 15 callers
Function
copy_d_to_h_async
(dst: *mut c_void, src: u64, bytes: usize, stream: u64)
crates/spark-storage/src/cuda_min.rs:155
↓ 15 callers
Function
dense_minus_one
Load a BF16 norm weight and subtract 1.0 from every element. Atlas's `rms_norm` kernel uses the Qwen3-Next "offset-from-1" convention (`out = x * (1
crates/spark-model/src/weight_map/model_a.rs:133
↓ 15 callers
Function
docker_on
Run `sudo docker ARGS` on the given host.
tests/run_all_models.py:273
↓ 15 callers
Function
err
(src: &str)
crates/xgrammar/src/grammar/parser_error_tests.rs:11
↓ 15 callers
Method
find
Find the representative of the set containing `element`, applying path compression. # Panics Panics if `element` is not present — mirrors the C++ `XG
crates/xgrammar/src/support/union_find.rs:66
↓ 15 callers
Method
gemv
Dispatch GEMV to the appropriate kernel based on weight precision.
crates/spark-model/src/layers/mtp_head.rs:171
↓ 15 callers
Method
is_null
(self)
crates/spark-runtime/src/gpu.rs:42
↓ 15 callers
Method
is_repeat_ref
True if this is a repeat reference.
crates/xgrammar/src/fsm/edge.rs:74
↓ 15 callers
Method
leak_markers
(&self)
crates/spark-server/src/tool_parser/qwen3_xml.rs:38
↓ 15 callers
Function
next_tool_call_id
Generate a globally unique tool call ID.
crates/spark-server/src/tool_parser.rs:20
↓ 15 callers
Method
numel
Total number of elements.
crates/atlas-core/src/tensor.rs:38
↓ 15 callers
Function
parser
Build the parser for a format.
crates/spark-server/src/reasoning_parser/tests.rs:8
↓ 15 callers
Method
residual
(&self)
crates/spark-runtime/src/buffers.rs:223
↓ 15 callers
Method
rotary_dim
Rotary embedding dimension. Priority: 1. Explicit `rotary_dim` field (MiniMax M2 — integer in config.json). 2. `partial_rotary_factor * head_dim` (Qw
crates/atlas-core/src/config/methods.rs:67
↓ 15 callers
Method
save
Save SSM state from active pool slot into a snapshot slot. Returns `None` if no free snapshot slots are available. Tags the snapshot with `session_has
crates/spark-model/src/model/ssm_snapshot.rs:284
↓ 15 callers
Method
ssm_ba
(&self)
crates/spark-runtime/src/buffers.rs:253
↓ 15 callers
Method
ssm_conv_out_f32
FP32 conv1d output for SSM recurrent path (prevents BF16 precision drift).
crates/spark-runtime/src/buffers.rs:265
↓ 15 callers
Function
temp_dir
()
crates/spark-runtime/src/kv_spill.rs:113
↓ 15 callers
Function
tempdir
(name: &str)
crates/spark-storage/tests/common/mod.rs:41
↓ 15 callers
Method
turbo3_data_bytes
Turbo3 data section bytes (3-bit packed: 8 values in 3 bytes).
crates/spark-runtime/src/kv_cache.rs:382
↓ 15 callers
Method
update_rule_body
Set the body of rule `rule_id`. Returns `Err` if `rule_id` is out of range.
crates/xgrammar/src/grammar/builder_rules.rs:71
↓ 15 callers
Method
v_block_stride_bytes_for_layer
V-side block stride in bytes for a specific attention layer. Differs from K-side only for asymmetric KV cache dtypes.
crates/spark-runtime/src/kv_cache/paged_impl.rs:383
↓ 14 callers
Method
add_byte_string
Add a `ByteString` expr from a Rust string (UTF-8 bytes).
crates/xgrammar/src/grammar/builder.rs:156
↓ 14 callers
Method
add_end_state
Mark `state` accepting.
crates/xgrammar/src/fsm/with_start_end.rs:78
↓ 14 callers
Method
all_reachable_masks
(&self)
crates/xgrammar/src/compiler/compiled_grammar.rs:383
↓ 14 callers
Method
as_slice
(&self)
crates/spark-runtime/src/fast_weights/direct_io.rs:43
↓ 14 callers
Function
copy_h2d
(dst: *mut c_void, src: &[T])
crates/spark-runtime/src/cutlass/tests/mod.rs:44
↓ 14 callers
Method
create_rule
Create a rule for `spec` (or return a cached rule name) and return its name. Port of `CreateRule`.
crates/xgrammar/src/schema/converter.rs:348
↓ 14 callers
Function
ensure_registry
Ensure the AtlasRegistry is initialized (idempotent).
crates/atlas-spark-bench/src/gpu.rs:31
↓ 14 callers
Method
evict
Evict up to `num_blocks` LRU zero-ref leaf nodes. Returns physical block indices that were freed plus parallel disk-block IDs (Phase 6.1.e). When HSS
crates/spark-runtime/src/radix_tree/inner.rs:345
↓ 14 callers
Method
h_state
(&self, ssm_layer_idx: usize, slot: usize)
crates/spark-model/src/model/ssm_pool.rs:220
↓ 14 callers
Method
kv_pair
Returns the (K_dtype, V_dtype) pair. For symmetric variants both elements are identical. For asymmetric variants the pair differs.
crates/spark-runtime/src/kv_cache.rs:102
↓ 14 callers
Function
literal
(bytes: &[u8])
crates/xgrammar/src/fsm/with_start_end_tests.rs:8
↓ 14 callers
Function
load_kv_scales
Load FP8 KV cache quantization scales from a checkpoint. Searches for `{attn_prefix}.k_proj.k_scale` and `{attn_prefix}.v_proj.v_scale` tensors in th
crates/spark-model/src/weight_map/model_a.rs:57
← previous
next →
201–300 of 7,049, ranked by callers