mlx-bun library API
Documentation
Preparing search index...
@mlx-bun/inference
@mlx-bun/inference/models/qwen/blocks
QwenResidualAttentionLayer
Class QwenResidualAttentionLayer
The corresponding residual/normalization kernel after full attention.
Hierarchy (
View Summary
)
QwenAttentionLayer
QwenResidualAttentionLayer
Index
Constructors
constructor
Properties
input
Norm
mixer
mlp
post
Attn
Norm
Methods
forward
forward
Attn
forward
Mlp
Constructors
constructor
new
QwenResidualAttentionLayer
(
...
args
:
[
weights
:
Weights
,
config
:
ModelConfig
,
prefix
:
string
,
mixer
:
{
forward
(
x
:
MlxArray
,
cache
:
Cache
,
phase
:
ReadPhase
,
positions
?:
MropeForwardState
|
null
,
)
:
MlxArray
;
}
,
mlp
:
{
forward
(
x
:
MlxArray
)
:
MlxArray
}
,
]
,
)
:
QwenResidualAttentionLayer
Parameters
...
args
:
[
weights
:
Weights
,
config
:
ModelConfig
,
prefix
:
string
,
mixer
:
{
forward
(
x
:
MlxArray
,
cache
:
Cache
,
phase
:
ReadPhase
,
positions
?:
MropeForwardState
|
null
,
)
:
MlxArray
;
}
,
mlp
:
{
forward
(
x
:
MlxArray
)
:
MlxArray
}
,
]
Returns
QwenResidualAttentionLayer
Properties
Readonly
input
Norm
inputNorm
:
RMSNorm
Readonly
mixer
mixer
:
{
forward
(
x
:
MlxArray
,
cache
:
Cache
,
phase
:
ReadPhase
,
positions
?:
MropeForwardState
|
null
,
)
:
MlxArray
;
}
Readonly
mlp
mlp
:
{
forward
(
x
:
MlxArray
)
:
MlxArray
}
Readonly
post
Attn
Norm
postAttnNorm
:
RMSNorm
Methods
forward
forward
(
x
:
MlxArray
,
cache
:
Cache
,
phase
:
ReadPhase
,
positions
?:
MropeForwardState
|
null
,
)
:
MlxArray
Parameters
x
:
MlxArray
cache
:
Cache
phase
:
ReadPhase
positions
:
MropeForwardState
|
null
= null
Returns
MlxArray
forward
Attn
forwardAttn
(
x
:
MlxArray
,
cache
:
Cache
,
phase
:
ReadPhase
,
positions
?:
MropeForwardState
|
null
,
)
:
MlxArray
Parameters
x
:
MlxArray
cache
:
Cache
phase
:
ReadPhase
positions
:
MropeForwardState
|
null
= null
Returns
MlxArray
forward
Mlp
forwardMlp
(
x
:
MlxArray
)
:
MlxArray
Parameters
x
:
MlxArray
Returns
MlxArray
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
input
Norm
mixer
mlp
post
Attn
Norm
Methods
forward
forward
Attn
forward
Mlp
Documentation
mlx-bun library API
Loading...
The corresponding residual/normalization kernel after full attention.