mlx-bun library API
Documentation
Preparing search index...
@mlx-bun/inference
@mlx-bun/inference/models/qwen/written-layers
AttentionWeights
Class AttentionWeights
Index
Constructors
constructor
Properties
k
Proj
o
Proj
prefix
q
Proj
trellis
v
Proj
Methods
ane
ane
Projections
ane
Stage
fused
media
media
Layer
prompt
stage
targets
text
with
Bound
Projections
with
Mlp
with
Projections
Constructors
constructor
new
AttentionWeights
(
weights
:
Weights
,
config
:
ModelConfig
,
prefix
:
string
,
representations
:
TrellisRepresentations
,
state
:
LoraState
,
)
:
AttentionWeights
Parameters
weights
:
Weights
config
:
ModelConfig
prefix
:
string
representations
:
TrellisRepresentations
state
:
LoraState
Returns
AttentionWeights
Properties
Readonly
k
Proj
kProj
:
QuantizedLinear
Readonly
o
Proj
oProj
:
QuantizedLinear
Readonly
prefix
prefix
:
string
Readonly
q
Proj
qProj
:
QuantizedLinear
Readonly
trellis
trellis
:
TrellisWeights
Readonly
v
Proj
vProj
:
QuantizedLinear
Methods
ane
ane
(
weights
:
Weights
,
config
:
ModelConfig
,
Plain
:
AffineProjectionClass
,
Split
:
typeof
AneAffineSplit
,
fraction
:
number
,
rows
:
number
,
shares
:
AneWeightShares
,
)
:
Qwen3TextAttention
<
RowProjection
>
Parameters
weights
:
Weights
config
:
ModelConfig
Plain
:
AffineProjectionClass
Split
:
typeof
AneAffineSplit
fraction
:
number
rows
:
number
shares
:
AneWeightShares
Returns
Qwen3TextAttention
<
RowProjection
>
ane
Projections
aneProjections
(
weights
:
Weights
,
config
:
ModelConfig
,
Layer
:
typeof
QwenAttentionLayer
,
mlp
:
RowProjection
,
Split
:
typeof
AneAffineSplit
,
Dense
:
AffineProjectionClass
,
_Plain
:
AffineProjectionClass
,
rows
:
number
,
shares
:
AneWeightShares
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
Layer
:
typeof
QwenAttentionLayer
mlp
:
RowProjection
Split
:
typeof
AneAffineSplit
Dense
:
AffineProjectionClass
_Plain
:
AffineProjectionClass
rows
:
number
shares
:
AneWeightShares
Returns
QwenAttentionLayer
ane
Stage
aneStage
(
weights
:
Weights
,
config
:
ModelConfig
,
Layer
:
typeof
QwenAttentionLayer
,
Mlp
:
typeof
AneBoundMlp
,
Split
:
AneMlpClass
,
Affine
:
typeof
AneAffineSplit
,
Plain
:
AffineProjectionClass
,
fraction
:
number
,
rows
:
number
,
shares
:
AneWeightShares
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
Layer
:
typeof
QwenAttentionLayer
Mlp
:
typeof
AneBoundMlp
Split
:
AneMlpClass
Affine
:
typeof
AneAffineSplit
Plain
:
AffineProjectionClass
fraction
:
number
rows
:
number
shares
:
AneWeightShares
Returns
QwenAttentionLayer
fused
fused
(
weights
:
Weights
,
config
:
ModelConfig
,
Layer
:
typeof
QwenAttentionLayer
,
Mlp
:
FusedClass
,
Down
:
TrellisProjectionClass
,
Plain
:
AffineProjectionClass
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
Layer
:
typeof
QwenAttentionLayer
Mlp
:
FusedClass
Down
:
TrellisProjectionClass
Plain
:
AffineProjectionClass
Returns
QwenAttentionLayer
media
media
(
weights
:
Weights
,
config
:
ModelConfig
,
Q
:
AffineProjectionClass
,
K
:
AffineProjectionClass
,
V
:
AffineProjectionClass
,
O
:
AffineProjectionClass
,
)
:
Qwen3MediaAttention
<
RowProjection
>
Parameters
weights
:
Weights
config
:
ModelConfig
Q
:
AffineProjectionClass
K
:
AffineProjectionClass
V
:
AffineProjectionClass
O
:
AffineProjectionClass
Returns
Qwen3MediaAttention
<
RowProjection
>
media
Layer
mediaLayer
(
weights
:
Weights
,
config
:
ModelConfig
,
Layer
:
typeof
QwenAttentionLayer
,
mlp
:
RowProjection
,
Projection
:
AffineProjectionClass
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
Layer
:
typeof
QwenAttentionLayer
mlp
:
RowProjection
Projection
:
AffineProjectionClass
Returns
QwenAttentionLayer
prompt
prompt
(
weights
:
Weights
,
config
:
ModelConfig
,
Layer
:
typeof
QwenAttentionLayer
,
Mlp
:
UnfusedClass
,
Gate
:
TrellisProjectionClass
,
Down
:
TrellisProjectionClass
,
Plain
:
AffineProjectionClass
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
Layer
:
typeof
QwenAttentionLayer
Mlp
:
UnfusedClass
Gate
:
TrellisProjectionClass
Down
:
TrellisProjectionClass
Plain
:
AffineProjectionClass
Returns
QwenAttentionLayer
stage
stage
(
weights
:
Weights
,
config
:
ModelConfig
,
Layer
:
typeof
QwenAttentionLayer
,
Mlp
:
GateDownClass
,
GateUp
:
GateUpClass
,
Gate
:
TrellisProjectionClass
,
Down
:
TrellisProjectionClass
,
Q
:
AffineProjectionClass
,
K
:
AffineProjectionClass
,
V
:
AffineProjectionClass
,
O
:
AffineProjectionClass
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
Layer
:
typeof
QwenAttentionLayer
Mlp
:
GateDownClass
GateUp
:
GateUpClass
Gate
:
TrellisProjectionClass
Down
:
TrellisProjectionClass
Q
:
AffineProjectionClass
K
:
AffineProjectionClass
V
:
AffineProjectionClass
O
:
AffineProjectionClass
Returns
QwenAttentionLayer
targets
targets
()
:
readonly
(
readonly
[
string
,
QwenProjectionTarget
]
)
[]
Returns
readonly
(
readonly
[
string
,
QwenProjectionTarget
]
)
[]
text
text
(
weights
:
Weights
,
config
:
ModelConfig
,
Q
:
AffineProjectionClass
,
K
:
AffineProjectionClass
,
V
:
AffineProjectionClass
,
O
:
AffineProjectionClass
,
)
:
Qwen3TextAttention
<
RowProjection
>
Parameters
weights
:
Weights
config
:
ModelConfig
Q
:
AffineProjectionClass
K
:
AffineProjectionClass
V
:
AffineProjectionClass
O
:
AffineProjectionClass
Returns
Qwen3TextAttention
<
RowProjection
>
with
Bound
Projections
withBoundProjections
(
weights
:
Weights
,
config
:
ModelConfig
,
Layer
:
typeof
QwenAttentionLayer
,
mlp
:
RowProjection
,
q
:
RowProjection
,
k
:
RowProjection
,
v
:
RowProjection
,
o
:
RowProjection
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
Layer
:
typeof
QwenAttentionLayer
mlp
:
RowProjection
q
:
RowProjection
k
:
RowProjection
v
:
RowProjection
o
:
RowProjection
Returns
QwenAttentionLayer
with
Mlp
withMlp
(
weights
:
Weights
,
config
:
ModelConfig
,
Layer
:
typeof
QwenAttentionLayer
,
mlp
:
RowProjection
,
Projection
:
AffineProjectionClass
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
Layer
:
typeof
QwenAttentionLayer
mlp
:
RowProjection
Projection
:
AffineProjectionClass
Returns
QwenAttentionLayer
with
Projections
withProjections
(
weights
:
Weights
,
config
:
ModelConfig
,
Layer
:
typeof
QwenAttentionLayer
,
mlp
:
RowProjection
,
Q
:
AffineProjectionClass
,
K
:
AffineProjectionClass
,
V
:
AffineProjectionClass
,
O
:
AffineProjectionClass
,
)
:
QwenAttentionLayer
Parameters
weights
:
Weights
config
:
ModelConfig
Layer
:
typeof
QwenAttentionLayer
mlp
:
RowProjection
Q
:
AffineProjectionClass
K
:
AffineProjectionClass
V
:
AffineProjectionClass
O
:
AffineProjectionClass
Returns
QwenAttentionLayer
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
k
Proj
o
Proj
prefix
q
Proj
trellis
v
Proj
Methods
ane
ane
Projections
ane
Stage
fused
media
media
Layer
prompt
stage
targets
text
with
Bound
Projections
with
Mlp
with
Projections
Documentation
mlx-bun library API
Loading...