Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MLSysU/TD-Pipe
/ types & classes
Types & classes
128 in github.com/MLSysU/TD-Pipe
⨍
Functions
572
◇
Types & classes
128
↳
Endpoints
6
↓ 9 callers
Class
RMSNorm
Root mean square normalization. Computes x -> w * x / sqrt(E[x^2] + eps) where w is the learned weight. Refer to https://arxiv.org/abs/1910.0
TD_Pipe/model_executor/layers/layernorm.py:10
↓ 7 callers
Class
RowParallelLinear
Linear layer with row parallelism. The linear layer is defined as Y = XA + b. A is parallelized along its first dimension and X along its sec
TD_Pipe/model_executor/layers/linear.py:441
↓ 7 callers
Class
SamplingParams
Sampling parameters for text generation. Overall, we follow the sampling parameters from the OpenAI text completion API (https://platform.ope
TD_Pipe/sampling_params.py:23
↓ 6 callers
Class
ReplicatedLinear
Replicated linear layer. Args: input_size: input dimension of the linear layer. output_size: output dimension of the linear layer
TD_Pipe/model_executor/layers/linear.py:75
↓ 4 callers
Class
AsyncEngineDeadError
TD_Pipe/engine/async_llm_engine.py:20
↓ 4 callers
Class
Attention
Attention layer. This class takes query, key, and value tensors as input. The input tensors can either contain prompt tokens or generation tok
TD_Pipe/model_executor/layers/attention/attention.py:12
↓ 4 callers
Class
ChatCompletionResponseStreamChoice
TD_Pipe/entrypoints/openai/protocol.py:175
↓ 4 callers
Class
ChatCompletionStreamResponse
TD_Pipe/entrypoints/openai/protocol.py:181
↓ 4 callers
Class
Projection
1. Discard the hidden states that are not used for sampling (i.e., all tokens except the final one in each prompt). 2. Compute the lo
TD_Pipe/model_executor/layers/projection.py:16
↓ 4 callers
Class
QKVParallelLinear
Linear layers for the attention's QKV transformation. Linear layers for the linear transformation of the query, key, and value vectors in the
TD_Pipe/model_executor/layers/linear.py:316
↓ 4 callers
Class
Sampler
Samples the next tokens from the model's outputs. This layer does the following: 3. Apply presence, frequency and repetition penalties. 4
TD_Pipe/model_executor/layers/sampler.py:15
↓ 4 callers
Class
UsageInfo
TD_Pipe/entrypoints/openai/protocol.py:49
↓ 4 callers
Class
VocabParallelEmbedding
Embedding parallelized in the vocabulary dimension. Adapted from torch.nn.Embedding, note that we pad the vocabulary size to make sure it is
TD_Pipe/model_executor/layers/vocab_parallel_embedding.py:36
↓ 3 callers
Class
DeltaMessage
TD_Pipe/entrypoints/openai/protocol.py:170
↓ 3 callers
Class
UnquantizedLinearMethod
Linear method without quantization. Args: separate_bias_add: If true, add bias separately after matrix multipl
TD_Pipe/model_executor/layers/linear.py:40
↓ 3 callers
Class
Worker
A worker class that executes (a partition of) the model on a GPU. Each worker is associated with a single GPU. The worker is responsible for
TD_Pipe/worker/worker.py:21
↓ 2 callers
Class
BlockAllocator
Manages free physical token blocks for a device. The allocator maintains a list of free blocks and allocates a block when requested. When a b
TD_Pipe/core/block_manager.py:13
↓ 2 callers
Class
Counter
TD_Pipe/utils.py:19
↓ 2 callers
Class
InputMetadata
Metadata for input sequences. Used in PagedAttention. Args: prompt_lens: Lengths of prompts. slot_mapping: The address to write t
TD_Pipe/model_executor/input_metadata.py:8
↓ 2 callers
Class
LLM
An LLM for generating texts from given prompts and sampling parameters. This class includes a tokenizer, a language model (possibly distributed
TD_Pipe/entrypoints/llm.py:13
↓ 2 callers
Class
LogProbs
TD_Pipe/entrypoints/openai/protocol.py:111
↓ 2 callers
Class
MergedColumnParallelLinear
Packed linear layers with column parallelism. Similar to ColumnParallelLinear, but the weight matrix is concatenated along the output dimensi
TD_Pipe/model_executor/layers/linear.py:222
↓ 2 callers
Class
ParallelLMHead
Parallelized LM head. Output logits weight matrices used in the Sampler. The weight and bias tensors are padded to make sure they are divisib
TD_Pipe/model_executor/layers/vocab_parallel_embedding.py:105
↓ 2 callers
Class
SchedulerOutputs
TD_Pipe/core/scheduler.py:32
↓ 2 callers
Class
SequenceData
Data associated with a sequence. Args: prompt_token_ids: The token IDs of the prompt. Attributes: prompt_token_ids: The tok
TD_Pipe/sequence.py:51
↓ 2 callers
Class
SequenceGroupMetadata
Metadata for a sequence group. Used to create `InputMetadata`. Args: request_id: The ID of the request. is_prompt: Whether the r
TD_Pipe/sequence.py:337
↓ 2 callers
Class
SiluAndMul
An activation function for SwiGLU. The function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2. Shapes: x: (batch_size
TD_Pipe/model_executor/layers/activation.py:17
↓ 1 callers
Class
AWQLinearMethod
Linear method for AWQ. Args: quant_config: The AWQ quantization config.
TD_Pipe/model_executor/layers/quantization/awq.py:70
↓ 1 callers
Class
AsyncStream
A stream of RequestOutputs for a request that can be iterated over asynchronously.
TD_Pipe/engine/async_llm_engine.py:42
↓ 1 callers
Class
BlockSpaceManager
Manages the mapping between logical and physical token blocks.
TD_Pipe/core/block_manager.py:71
↓ 1 callers
Class
CacheConfig
Configuration for the KV cache. Args: block_size: Size of a cache block in number of tokens. gpu_memory_utilization: Fraction of
TD_Pipe/config.py:258
↓ 1 callers
Class
CacheEngine
Manages the KV cache. This class is responsible for initializing and managing the GPU and CPU KV caches. It also provides methods for perform
TD_Pipe/worker/cache_engine.py:16
↓ 1 callers
Class
ChatCompletionResponse
TD_Pipe/entrypoints/openai/protocol.py:161
↓ 1 callers
Class
ChatCompletionResponseChoice
TD_Pipe/entrypoints/openai/protocol.py:155
↓ 1 callers
Class
ChatMessage
TD_Pipe/entrypoints/openai/protocol.py:150
↓ 1 callers
Class
ColumnParallelLinear
Linear layer with column parallelism. The linear layer is defined as Y = XA + b. A is parallelized along its second dimension as A = [A_1, ..
TD_Pipe/model_executor/layers/linear.py:130
↓ 1 callers
Class
CompletionOutput
The output data of one completion output of a request. Args: index: The index of the output in the request. text: The generated o
TD_Pipe/outputs.py:7
↓ 1 callers
Class
CompletionResponse
TD_Pipe/entrypoints/openai/protocol.py:125
↓ 1 callers
Class
CompletionResponseChoice
TD_Pipe/entrypoints/openai/protocol.py:118
↓ 1 callers
Class
CompletionResponseStreamChoice
TD_Pipe/entrypoints/openai/protocol.py:134
↓ 1 callers
Class
CompletionStreamResponse
TD_Pipe/entrypoints/openai/protocol.py:141
↓ 1 callers
Class
DynamicNTKScalingRotaryEmbedding
RotaryEmbedding extended with Dynamic NTK scaling. Credits to the Reddit users /u/bloc97 and /u/emozilla
TD_Pipe/model_executor/layers/rotary_embedding.py:187
↓ 1 callers
Class
EngineArgs
Arguments for vLLM engine.
TD_Pipe/engine/arg_utils.py:11
↓ 1 callers
Class
ErrorResponse
TD_Pipe/entrypoints/openai/protocol.py:11
↓ 1 callers
Class
FastGELU
TD_Pipe/model_executor/layers/activation.py:54
↓ 1 callers
Class
FlashAttentionBackend
If the input tensors contain prompt tokens, the layout is as follows: |<--------------- num_prompt_tokens -------------->| |<--prompt_0-
TD_Pipe/model_executor/layers/attention/backends/flash_attn.py:13
↓ 1 callers
Class
FlashInferBackend
TD_Pipe/model_executor/layers/attention/backends/flashinfer.py:13
↓ 1 callers
Class
GPTQLinearMethod
Linear method for GPTQ. Args: quant_config: The GPTQ quantization config.
TD_Pipe/model_executor/layers/quantization/gptq.py:80
↓ 1 callers
Class
LinearScalingRotaryEmbedding
RotaryEmbedding extended with linear scaling. Credits to the Reddit user /u/kaiokendev
TD_Pipe/model_executor/layers/rotary_embedding.py:151
↓ 1 callers
Class
LlamaAttention
TD_Pipe/model_executor/models/llama.py:85
↓ 1 callers
Class
LlamaDecoderLayer
TD_Pipe/model_executor/models/llama.py:165
↓ 1 callers
Class
LlamaMLP
TD_Pipe/model_executor/models/llama.py:55
↓ 1 callers
Class
LlamaModel
TD_Pipe/model_executor/models/llama.py:229
↓ 1 callers
Class
LogicalTokenBlock
A block that stores a contiguous chunk of tokens from left to right. Logical blocks are used to represent the states of the corresponding phy
TD_Pipe/block.py:9
↓ 1 callers
Class
MixtralAttention
TD_Pipe/model_executor/models/mixtral.py:166
↓ 1 callers
Class
MixtralDecoderLayer
TD_Pipe/model_executor/models/mixtral.py:246
↓ 1 callers
Class
MixtralMLP
TD_Pipe/model_executor/models/mixtral.py:60
↓ 1 callers
Class
MixtralMoE
TD_Pipe/model_executor/models/mixtral.py:99
↓ 1 callers
Class
MixtralModel
TD_Pipe/model_executor/models/mixtral.py:303
↓ 1 callers
Class
ModelCard
TD_Pipe/entrypoints/openai/protocol.py:34
↓ 1 callers
Class
ModelConfig
Configuration for the model. Args: model: Name or path of the huggingface model to use. tokenizer: Name or path of the huggingfac
TD_Pipe/config.py:16
↓ 1 callers
Class
ModelList
TD_Pipe/entrypoints/openai/protocol.py:44
↓ 1 callers
Class
ModelPermission
TD_Pipe/entrypoints/openai/protocol.py:19
↓ 1 callers
Class
ModelRunner
TD_Pipe/worker/model_runner.py:25
↓ 1 callers
Class
NewGELU
TD_Pipe/model_executor/layers/activation.py:40
↓ 1 callers
Class
NewLineFormatter
Adds logging prefix to newlines to align multi-line messages.
TD_Pipe/logger.py:11
↓ 1 callers
Class
OPTAttention
TD_Pipe/model_executor/models/opt.py:62
↓ 1 callers
Class
OPTDecoder
TD_Pipe/model_executor/models/opt.py:191
↓ 1 callers
Class
OPTDecoderLayer
TD_Pipe/model_executor/models/opt.py:115
↓ 1 callers
Class
OPTLearnedPositionalEmbedding
TD_Pipe/model_executor/models/opt.py:49
↓ 1 callers
Class
OPTModel
TD_Pipe/model_executor/models/opt.py:285
↓ 1 callers
Class
ParallelConfig
Configuration for the distributed execution. Args: pipeline_parallel_size: Number of pipeline parallel groups. tensor_parallel_si
TD_Pipe/config.py:310
↓ 1 callers
Class
PhysicalTokenBlock
Represents the state of a block in the KV cache.
TD_Pipe/block.py:50
↓ 1 callers
Class
Qwen2Attention
TD_Pipe/model_executor/models/qwen2.py:88
↓ 1 callers
Class
Qwen2DecoderLayer
TD_Pipe/model_executor/models/qwen2.py:169
↓ 1 callers
Class
Qwen2MLP
TD_Pipe/model_executor/models/qwen2.py:57
↓ 1 callers
Class
Qwen2Model
TD_Pipe/model_executor/models/qwen2.py:233
↓ 1 callers
Class
RequestTracker
Synchronous abstraction for tracking requests.
TD_Pipe/engine/async_llm_engine.py:76
↓ 1 callers
Class
RotaryEmbedding
Original rotary positional embedding.
TD_Pipe/model_executor/layers/rotary_embedding.py:46
↓ 1 callers
Class
SamplingMetadata
Metadata for input sequences. Used in sampler. Args: seq_groups: List of (seq_ids, sampling_params). seq_data: Seq_id -> Sequence
TD_Pipe/model_executor/sampling_metadata.py:13
↓ 1 callers
Class
ScaledActivation
An activation function with post-scale parameters. This is used for some quantization methods like AWQ.
TD_Pipe/model_executor/layers/activation.py:67
↓ 1 callers
Class
Scheduler
TD_Pipe/core/scheduler.py:61
↓ 1 callers
Class
SchedulerConfig
Scheduler configuration. Args: max_num_batched_tokens: Maximum number of tokens to be processed in a single iteration.
TD_Pipe/config.py:343
↓ 1 callers
Class
Sequence
Stores the data, status, and block information of a sequence. Args: seq_id: The ID of the sequence. prompt: The prompt of the seq
TD_Pipe/sequence.py:100
↓ 1 callers
Class
SequenceGroup
A group of sequences that are generated from the same prompt. Args: request_id: The ID of the request. seqs: The list of sequence
TD_Pipe/sequence.py:226
↓ 1 callers
Class
SequenceGroupOutput
The model output associated with a sequence group.
TD_Pipe/sequence.py:399
↓ 1 callers
Class
SequenceOutput
The model output associated with a sequence. Args: parent_seq_id: The ID of the parent sequence (for forking in beam search).
TD_Pipe/sequence.py:365
↓ 1 callers
Class
SqueezeLLMLinearMethod
Linear method for SqueezeLLM. Args: quant_config: The SqueezeLLM quantization config.
TD_Pipe/model_executor/layers/quantization/squeezellm.py:60
↓ 1 callers
Class
XFormersBackend
If the input tensors contain prompt tokens, the layout is as follows: |<--------------- num_prompt_tokens --------------->| |<--prompt_0
TD_Pipe/model_executor/layers/attention/backends/xformers.py:14
↓ 1 callers
Class
YaRNScalingRotaryEmbedding
RotaryEmbedding extended with YaRN method. Credits to Peng et al. github.com/jquesnelle/yarn
TD_Pipe/model_executor/layers/rotary_embedding.py:268
Class
AWQConfig
Config class for AWQ. Reference: https://arxiv.org/abs/2306.00978
TD_Pipe/model_executor/layers/quantization/awq.py:12
Class
AllocStatus
Result for BlockSpaceManager.can_allocate 1. Ok: seq_group can be allocated now. 2. Later: seq_group cannot be allocated. The capacity
TD_Pipe/core/block_manager.py:57
Class
AquilaConfig
TD_Pipe/transformers_utils/configs/aquila.py:25
Class
AsyncEngineArgs
Arguments for asynchronous vLLM engine.
TD_Pipe/engine/arg_utils.py:231
Class
AsyncLLMEngine
An asynchronous wrapper for LLMEngine. This class is used to wrap the LLMEngine class to make it asynchronous. It uses asyncio to create a ba
TD_Pipe/engine/async_llm_engine.py:232
Class
BaiChuanConfig
TD_Pipe/transformers_utils/configs/baichuan.py:24
Class
BaichuanTokenizer
Construct a Baichuan tokenizer. Based on byte-level Byte-Pair-Encoding. Args: vocab_file (`str`): Path to the vocabulary
TD_Pipe/transformers_utils/tokenizers/baichuan.py:28
Class
ChatCompletionRequest
TD_Pipe/entrypoints/openai/protocol.py:55
Class
ChatGLMConfig
TD_Pipe/transformers_utils/configs/chatglm.py:7
Class
CompletionRequest
TD_Pipe/entrypoints/openai/protocol.py:82
next →
1–100 of 128, ranked by callers