mlx-bun library API
Documentation
Preparing search index...
@mlx-bun/inference
@mlx-bun/inference/models/minicpm5
LlamaLayer
Class LlamaLayer
Index
Constructors
constructor
Properties
attn
input
Norm
mlp
post
Attn
Norm
Methods
forward
forward
Training
Constructors
constructor
new
LlamaLayer
(
weights
:
Weights
,
config
:
ModelConfig
,
prefix
:
string
,
Mlp
?:
MlpBlock
,
)
:
LlamaLayer
Parameters
weights
:
Weights
config
:
ModelConfig
prefix
:
string
Mlp
:
MlpBlock
= LlamaMLP
Returns
LlamaLayer
Properties
Readonly
attn
attn
:
LlamaAttention
Readonly
input
Norm
inputNorm
:
RMSNorm
Readonly
mlp
mlp
:
MiniCpmMlp
Readonly
post
Attn
Norm
postAttnNorm
:
RMSNorm
Methods
forward
forward
(
x
:
MlxArray
,
cache
:
Cache
,
phase
:
ReadPhase
)
:
MlxArray
Parameters
x
:
MlxArray
cache
:
Cache
phase
:
ReadPhase
Returns
MlxArray
forward
Training
forwardTraining
(
x
:
MlxArray
,
cache
:
TrainingAttentionCache
)
:
MlxArray
The training forward (
LlamaAttention.forwardTraining
).
Parameters
x
:
MlxArray
cache
:
TrainingAttentionCache
Returns
MlxArray
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
attn
input
Norm
mlp
post
Attn
Norm
Methods
forward
forward
Training
Documentation
mlx-bun library API
Loading...
The training forward (
LlamaAttention.forwardTraining).