Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ScalingIntelligence/tokasaurus
/ functions
Functions
507 in github.com/ScalingIntelligence/tokasaurus
⨍
Functions
507
◇
Types & classes
95
↳
Endpoints
10
↓ 2 callers
Method
lm_head_batch_indices
(self)
tokasaurus/model/types.py:369
↓ 2 callers
Function
make_basic_config
()
tests/test_basic.py:25
↓ 2 callers
Function
make_batch_status
(batch: SubmittedBatch)
tokasaurus/server/utils.py:799
↓ 2 callers
Function
make_completions_fingerprint
Sneaky way to send extra data back to the client while adhering to the API spec.
tokasaurus/server/utils.py:646
↓ 2 callers
Function
make_dummy_batch
( config: ServerConfig, prefill_tokens: int, decode_tokens: int, prefill_uses_lm_head: bool =
tokasaurus/manager/input_building.py:14
↓ 2 callers
Method
make_name_to_hf_name
(self)
tokasaurus/model/llama.py:824
↓ 2 callers
Function
make_pass_at_k_table
(corrects_list: list[list[bool]], ks: list[int])
tokasaurus/benchmarks/utils.py:203
↓ 2 callers
Function
make_proc_dict
(config: ServerConfig, add_extra_barrier_member: bool = False)
tokasaurus/entry.py:59
↓ 2 callers
Method
make_process
(self)
tokasaurus/common_types.py:32
↓ 2 callers
Function
make_scheduling_decision
( queue: SchedulingQueue, num_prefill: float, )
tokasaurus/manager/scheduler.py:541
↓ 2 callers
Method
make_tp_map
Maps parameter names to the dimension they should be split on. Parameters that are not included in the map should not be split.
tokasaurus/model/llama.py:858
↓ 2 callers
Function
make_usage_info
(request: TokasaurusRequest, output: RequestOutput)
tokasaurus/server/utils.py:266
↓ 2 callers
Method
match_state_to_graph
(self, input_batch_state: BatchState)
tokasaurus/model/utils.py:785
↓ 2 callers
Method
match_to_graph
(self, num_prefill_tokens: int, num_decode_tokens: int)
tokasaurus/model/utils.py:768
↓ 2 callers
Method
max_batch_index
(self)
tokasaurus/common_types.py:134
↓ 2 callers
Function
maybe_stdev
(values)
tokasaurus/manager/monitoring.py:113
↓ 2 callers
Function
median
(lst)
tokasaurus/utils.py:128
↓ 2 callers
Method
model_config
(self)
tokasaurus/common_types.py:138
↓ 2 callers
Function
needed_blocks
(seq: Sequence)
tokasaurus/manager/manager.py:749
↓ 2 callers
Method
num_blocks_needed
(self, kv_indices: list[int], length: int)
tokasaurus/manager/allocator.py:254
↓ 2 callers
Method
num_cached_blocks
(self, page_size: int)
tokasaurus/manager/types.py:133
↓ 2 callers
Method
num_decode_tokens
(self)
tokasaurus/model/types.py:363
↓ 2 callers
Method
num_kv_heads
(self)
tokasaurus/model/llama.py:629
↓ 2 callers
Method
num_qo_heads
(self)
tokasaurus/model/llama.py:635
↓ 2 callers
Function
postprocess
(work: Work)
tokasaurus/model/basic_worker.py:148
↓ 2 callers
Method
prefix_match
(self, input_ids: list[int])
tokasaurus/manager/allocator.py:196
↓ 2 callers
Function
prepend_conda_activate
(command: str, activate_path: str, env: str)
tokasaurus/benchmarks/utils.py:96
↓ 2 callers
Function
preprocess
()
tokasaurus/model/basic_worker.py:57
↓ 2 callers
Function
process_completions_output
( state: ServerState, crequest: CompletionsRequest, request: TokasaurusRequest, output: Reques
tokasaurus/server/utils.py:743
↓ 2 callers
Function
process_request
( state: ServerState, request: ChatCompletionRequest | CompletionsRequest )
tokasaurus/server/utils.py:570
↓ 2 callers
Function
queue_iterator
(q: mp.Queue)
tokasaurus/utils.py:479
↓ 2 callers
Function
register_batch_index
(seq: Sequence, num_tokens: int)
tokasaurus/manager/input_building.py:289
↓ 2 callers
Method
remove_prefilling
(self, sid: str)
tokasaurus/manager/types.py:201
↓ 2 callers
Method
reset
(self)
tokasaurus/manager/monitoring.py:140
↓ 2 callers
Function
restrict_hydragen_groups
Restricts the groups to only include seqs in restrict_to_seq_ids, and ensures that the groups meet the minimum group size/prefix length requi
tokasaurus/manager/hydragen.py:142
↓ 2 callers
Function
run_overlapped_loop
( preprocess, run_model, synchronize, postprocess, max_iters: int | None = None, prog_
tokasaurus/model/utils.py:267
↓ 2 callers
Function
sample_sharegpt_requests
()
tokasaurus/benchmarks/utils.py:223
↓ 2 callers
Function
sanity_check_block_usage
( state: ManagerState, block_usage_over_time: BlockUsageOverTime, )
tokasaurus/manager/manager.py:476
↓ 2 callers
Method
scheduler_block_target
(self)
tokasaurus/common_types.py:188
↓ 2 callers
Function
send_to_model
(state: ManagerState, command)
tokasaurus/manager/manager.py:59
↓ 2 callers
Function
seqs_to_input
( decoding_seqs: list[Sequence], prefill_seqs: list[tuple[Sequence, int]], schedule_id: str, p
tokasaurus/manager/input_building.py:152
↓ 2 callers
Function
setup_and_run_loop
( state: BasicWorkerState | PipelineWorkerState, model_runner: ModelRunner, preprocess, run_mo
tokasaurus/model/utils.py:885
↓ 2 callers
Function
setup_distributed
( config: ServerConfig, dp_rank: int, pp_rank: int, tp_rank: int, master_port: int )
tokasaurus/model/utils.py:56
↓ 2 callers
Function
simulate_blocks
(counts_per_last_page_len: list[int], num_steps: int)
tokasaurus/manager/scheduler.py:200
↓ 2 callers
Function
std
(lst)
tokasaurus/utils.py:123
↓ 2 callers
Method
std
(self)
tokasaurus/manager/stopping_predictor.py:145
↓ 2 callers
Function
submit_request
(state: ServerState, request: TokasaurusRequest)
tokasaurus/server/utils.py:229
↓ 2 callers
Function
terminate_process_tree
(pid)
tokasaurus/utils.py:318
↓ 2 callers
Function
truncate_to_multiple
(x: list, multiple: int)
tokasaurus/manager/allocator.py:64
↓ 2 callers
Function
unpad_output_batch_state
( output_batch_state: BatchState, model_input: ModelInput, )
tokasaurus/model/utils.py:918
↓ 2 callers
Method
update_prefix_tree
(self, blocks: list[PrefixTreeBlock], ids: list[int])
tokasaurus/manager/allocator.py:219
↓ 2 callers
Function
wait_for_ping
( port, popen: subprocess.Popen, retry_seconds=2, max_retries=500, ping_endpoint: str = "p
tokasaurus/utils.py:406
↓ 2 callers
Method
wipe
(self)
tokasaurus/manager/allocator.py:29
↓ 1 callers
Method
__init__
(self, head_dim: int, eps: float = 1e-6)
tokasaurus/model/qwen3.py:19
↓ 1 callers
Method
__init__
(self)
tokasaurus/benchmarks/standalone_monkeys_gsm8k.py:53
↓ 1 callers
Function
_client
()
tests/test_topk.py:40
↓ 1 callers
Function
_hostname
Get the hostname of this machine, used to identify it in statsd logs.
tokasaurus/manager/monitoring.py:92
↓ 1 callers
Function
_statsd_client
Create a statsd client.
tokasaurus/manager/monitoring.py:86
↓ 1 callers
Method
add_decision
(self, decision: "ScheduleDecision")
tokasaurus/manager/monitoring.py:150
↓ 1 callers
Method
add_decoding
(self, seq: Sequence)
tokasaurus/manager/types.py:189
↓ 1 callers
Method
add_finished_req
(self)
tokasaurus/manager/monitoring.py:162
↓ 1 callers
Method
add_finished_seq
(self)
tokasaurus/manager/monitoring.py:157
↓ 1 callers
Method
add_finished_sequences
(self, seqs: Iterable["Sequence"])
tokasaurus/manager/stopping_predictor.py:258
↓ 1 callers
Method
add_floating
(self, block: PrefixTreeBlock)
tokasaurus/manager/allocator.py:143
↓ 1 callers
Method
add_hydragen_stats
(self, num_grouped_blocks: int, num_total_blocks: int)
tokasaurus/manager/monitoring.py:176
↓ 1 callers
Method
add_manager_idle_time
(self, wait_time: float)
tokasaurus/manager/monitoring.py:167
↓ 1 callers
Method
add_num_new_commands
(self, num_new_commands: int)
tokasaurus/manager/monitoring.py:170
↓ 1 callers
Method
add_num_steps_to_schedule
(self, num_steps_to_schedule: int)
tokasaurus/manager/monitoring.py:173
↓ 1 callers
Method
add_queued
(self, seq: Sequence)
tokasaurus/manager/types.py:195
↓ 1 callers
Method
allocate
(self)
tokasaurus/manager/allocator.py:426
↓ 1 callers
Function
allocate_tokens_for_decode_bumping_seqs_if_necessary
( state: ManagerState, )
tokasaurus/manager/manager.py:746
↓ 1 callers
Function
append_to_kv_cache
Important to back out of torch compile for this op, since the compiler seemed to be making a copy of the cache, taking a lot of mem/time.
tokasaurus/model/attention_utils.py:87
↓ 1 callers
Function
apply_decision
( schedule_decision: ScheduleDecision, sched_queue: SchedulingQueue, )
tokasaurus/manager/scheduler.py:640
↓ 1 callers
Function
basic_model_loop
( state: BasicWorkerState, model: LlamaForCausalLM, )
tokasaurus/model/basic_worker.py:39
↓ 1 callers
Function
block_on_queues
(queues: list[mp.Queue])
tokasaurus/utils.py:487
↓ 1 callers
Method
buffer_empty
(self)
tokasaurus/manager/stopping_predictor.py:273
↓ 1 callers
Method
buffer_std
(self)
tokasaurus/manager/stopping_predictor.py:279
↓ 1 callers
Method
build_attention_info
Build the attention info tensors
tokasaurus/model/types.py:378
↓ 1 callers
Method
build_sampling_params
Build the sampling params tensors
tokasaurus/model/types.py:382
↓ 1 callers
Function
bump_city_onboard
Onboard as much as possible, with the intention of producing many bumps in the future. Useful for testing how the engine handles bumping.
tokasaurus/manager/manager.py:659
↓ 1 callers
Function
calc_cumulative_mean_stds
Given a list vals of length n, calculates for each i in [0, n-1] the mean and std of the subsequence vals[i:].
tokasaurus/manager/stopping_predictor.py:12
↓ 1 callers
Function
calc_prefill_per_forward
Returning inf = we can fit all sequences (including queued ones) in the KV cache, so prefill as fast as possible so we can run them all immed
tokasaurus/manager/scheduler.py:434
↓ 1 callers
Method
calc_stats
(self)
tokasaurus/manager/monitoring.py:179
↓ 1 callers
Function
calc_tokens_and_logprobs
( logits: Tensor, temperature: Tensor, greedy_mask: Tensor, config: ExtraModelConfig, )
tokasaurus/model/llama.py:377
↓ 1 callers
Function
can_load_from_safetensors
(model_path: Path)
tokasaurus/model/safetensors_utils.py:29
↓ 1 callers
Function
cancel_request
(state: ServerState, submitted_req: SubmittedRequest)
tokasaurus/server/utils.py:243
↓ 1 callers
Function
check_for_stop_strings
( state: ManagerState, seqs_with_outputs: set[Sequence], newly_finished_seqs: set[Sequence], n
tokasaurus/manager/manager.py:108
↓ 1 callers
Method
client
(self)
tokasaurus/benchmarks/standalone_monkeys_gsm8k.py:57
↓ 1 callers
Function
coarse_onboard
Onboard a sequence if all of its blocks fit within the smallest point in our block usage simulation.
tokasaurus/manager/manager.py:487
↓ 1 callers
Function
complete_server_startup
()
tokasaurus/core.py:25
↓ 1 callers
Function
compute_shard_bounds
( tensor_shape: List[int], dim: int, num_shards: int, shard_index: int )
tokasaurus/model/safetensors_utils.py:12
↓ 1 callers
Function
contains_data_dependency
( inp: ModelInput, inputs_in_front: Iterable[ModelInput], )
tokasaurus/model/pipeline_worker.py:288
↓ 1 callers
Method
copy_
(self, src: "BatchSamplingParams")
tokasaurus/model/types.py:282
↓ 1 callers
Method
copy_into_input_batch_state
( self, new_input_batch_state: BatchState, non_blocking: bool = False )
tokasaurus/model/utils.py:528
↓ 1 callers
Method
cpu_mean
(self)
tokasaurus/utils.py:151
↓ 1 callers
Method
cpu_median
(self)
tokasaurus/utils.py:160
↓ 1 callers
Method
cpu_std
(self)
tokasaurus/utils.py:154
↓ 1 callers
Function
create_cudagraph
( config: ServerConfig, model: LlamaForCausalLM, num_decode_tokens: int, pp_rank: int, tp_
tokasaurus/model/utils.py:631
↓ 1 callers
Function
create_wrappers
( device: DeviceType, num_attention_heads: int, num_key_value_heads: int, workspace_buffer: Te
tokasaurus/model/attention_utils.py:25
↓ 1 callers
Function
create_wrappers_for_cudagraph
( device: DeviceType, num_attention_heads: int, num_key_value_heads: int, num_decode_sequences
tokasaurus/model/attention_utils.py:50
← previous
next →
101–200 of 507, ranked by callers