Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ByteDance-Seed/AHN
/ types & classes
Types & classes
48 in github.com/ByteDance-Seed/AHN
⨍
Functions
289
◇
Types & classes
48
↳
Endpoints
2
↓ 8 callers
Class
Qwen3RMSNorm
src/ahn/transformer/qwen3/modeling_qwen3.py:63
↓ 6 callers
Class
Qwen2RMSNorm
src/ahn/transformer/qwen2/modeling_qwen2.py:211
↓ 4 callers
Class
GroupLinear
src/ahn/utils.py:29
↓ 4 callers
Class
Qwen2Model
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`Qwen2DecoderLayer`] Args: config: Qwen2Config
src/ahn/transformer/qwen2/modeling_qwen2.py:440
↓ 4 callers
Class
Qwen3Model
Transformer decoder consisting of *config.num_hidden_layers* layers. Each layer is a [`Qwen3DecoderLayer`] Args: config: Qwen3Config
src/ahn/transformer/qwen3/modeling_qwen3.py:468
↓ 2 callers
Class
AHNRouter
src/ahn/utils.py:183
↓ 2 callers
Class
BaseAHN
src/ahn/utils.py:82
↓ 2 callers
Class
Qwen2MLP
src/ahn/transformer/qwen2/modeling_qwen2.py:47
↓ 2 callers
Class
Qwen2RotaryEmbedding
src/ahn/transformer/qwen2/modeling_qwen2.py:288
↓ 2 callers
Class
Qwen3MLP
src/ahn/transformer/qwen3/modeling_qwen3.py:83
↓ 2 callers
Class
Qwen3RotaryEmbedding
src/ahn/transformer/qwen3/modeling_qwen3.py:316
↓ 1 callers
Class
CustomizedCausalLMOutputWithPast
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:57
↓ 1 callers
Class
CustomizedCausalLMOutputWithPast
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:59
↓ 1 callers
Class
CustomizedModelOutputWithPast
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:46
↓ 1 callers
Class
CustomizedModelOutputWithPast
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:48
↓ 1 callers
Class
Qwen2Attention
Multi-headed attention from 'Attention Is All You Need' paper
src/ahn/transformer/qwen2/modeling_qwen2.py:135
↓ 1 callers
Class
Qwen2DecoderLayer
src/ahn/transformer/qwen2/modeling_qwen2.py:231
↓ 1 callers
Class
Qwen2MemFlexAttn
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:112
↓ 1 callers
Class
Qwen2Model
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:382
↓ 1 callers
Class
Qwen3Attention
Multi-headed attention from 'Attention Is All You Need' paper
src/ahn/transformer/qwen3/modeling_qwen3.py:171
↓ 1 callers
Class
Qwen3DecoderLayer
src/ahn/transformer/qwen3/modeling_qwen3.py:257
↓ 1 callers
Class
Qwen3MemFlexAttn
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:114
↓ 1 callers
Class
Qwen3Model
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:385
Class
DeltaNet
r""" The layer implementaion for [Parallelizing Linear Transformers with the Delta Rule over Sequence Length](https://arxiv.org/abs/2406.06484).
src/ahn/rnn/delta_net.py:41
Class
GatedDeltaNet
The layer implementaion for [Gated Delta Networks: Improving Mamba2 with Delta Rule](https://arxiv.org/abs/2412.06464). # noqa Similar to M
src/ahn/rnn/gated_deltanet.py:46
Class
KwargsForCausalLM
src/ahn/transformer/qwen3/modeling_qwen3.py:826
Class
KwargsForCausalLM
src/ahn/transformer/qwen2/modeling_qwen2.py:732
Class
Mamba2
Compute ∆, A, B, C, and D the state space parameters and compute the `contextualized_states`. A, D are input independent (see Mamba paper [1]
src/ahn/rnn/mamba2.py:112
Class
Qwen2Config
r""" This is the configuration class to store the configuration of a [`Qwen2Model`]. It is used to instantiate a Qwen2 model according to the
src/ahn/transformer/qwen2/configuration_qwen2.py:25
Class
Qwen2Config
r""" Args: _layer_implementation (`str`, *optional*, defaults to 'Qwen2DecoderLayer'): Decoder layer implementation. _
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:66
Class
Qwen2ForCausalLM
src/ahn/transformer/qwen2/modeling_qwen2.py:735
Class
Qwen2ForCausalLM
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:717
Class
Qwen2ForQuestionAnswering
src/ahn/transformer/qwen2/modeling_qwen2.py:1044
Class
Qwen2ForSequenceClassification
src/ahn/transformer/qwen2/modeling_qwen2.py:869
Class
Qwen2ForTokenClassification
src/ahn/transformer/qwen2/modeling_qwen2.py:962
Class
Qwen2MemDecoderLayer
src/ahn/transformer/qwen2_ahn/qwen2_ahn.py:1048
Class
Qwen2PreTrainedModel
src/ahn/transformer/qwen2/modeling_qwen2.py:343
Class
Qwen2Tokenizer
Construct a Qwen2 tokenizer. Based on byte-level Byte-Pair-Encoding. Same with GPT2Tokenizer, this tokenizer has been trained to treat space
src/ahn/transformer/qwen2/tokenization_qwen2.py:83
Class
Qwen2TokenizerFast
Construct a "fast" Qwen2 tokenizer (backed by HuggingFace's *tokenizers* library). Based on byte-level Byte-Pair-Encoding. Same with GPT
src/ahn/transformer/qwen2/tokenization_qwen2_fast.py:37
Class
Qwen3Config
r""" This is the configuration class to store the configuration of a [`Qwen3Model`]. It is used to instantiate a Qwen3 model according to the
src/ahn/transformer/qwen3/configuration_qwen3.py:25
Class
Qwen3Config
r""" Args: _layer_implementation (`str`, *optional*, defaults to 'Qwen3DecoderLayer'): Decoder layer implementation. _
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:68
Class
Qwen3ForCausalLM
src/ahn/transformer/qwen3/modeling_qwen3.py:829
Class
Qwen3ForCausalLM
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:712
Class
Qwen3ForQuestionAnswering
src/ahn/transformer/qwen3/modeling_qwen3.py:1138
Class
Qwen3ForSequenceClassification
src/ahn/transformer/qwen3/modeling_qwen3.py:963
Class
Qwen3ForTokenClassification
src/ahn/transformer/qwen3/modeling_qwen3.py:1056
Class
Qwen3MemDecoderLayer
src/ahn/transformer/qwen3_ahn/qwen3_ahn.py:1033
Class
Qwen3PreTrainedModel
src/ahn/transformer/qwen3/modeling_qwen3.py:371