mlx-bun library API
Documentation
Preparing search index...
@mlx-bun/inference
@mlx-bun/inference/models/qwen/blocks
QwenAttentionLayer
Class QwenAttentionLayer
Full-attention decoder layer; text and media mixers are separate bindings.
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
QwenAttentionLayer
(
weights
:
Weights
,
config
:
ModelConfig
,
prefix
:
string
,
mixer
:
{
forward
(
x
:
MlxArray
,
cache
:
Cache
,
phase
:
ReadPhase
,
positions
?:
MropeForwardState
|
null
,
)
:
MlxArray
;
}
,
mlp
:
{
forward
(
x
:
MlxArray
)
:
MlxArray
}
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
prefix
:
string
mixer
:
{
forward
(
x
:
MlxArray
,
cache
:
Cache
,
phase
:
ReadPhase
,
positions
?:
MropeForwardState
|
null
,
)
:
MlxArray
;
}
mlp
:
{
forward
(
x
:
MlxArray
)
:
MlxArray
}
Returns
QwenAttentionLayer
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...
Full-attention decoder layer; text and media mixers are separate bindings.