mlx-bun library API
Documentation
Preparing search index...
@mlx-bun/inference
@mlx-bun/inference/models/gemma4/blocks
GemmaMoeLayer
Class GemmaMoeLayer
Index
Constructors
constructor
Properties
experts
mlp
weights
Accessors
attn
layer
Type
Methods
feedforward
forward
forward
Attn
Constructors
constructor
new
GemmaMoeLayer
(
weights
:
GemmaMoeLayerWeights
,
mlp
:
CompiledGegluMLP
,
experts
:
FixedExperts
,
)
:
GemmaMoeLayer
Parameters
weights
:
GemmaMoeLayerWeights
mlp
:
CompiledGegluMLP
experts
:
FixedExperts
Returns
GemmaMoeLayer
Properties
Readonly
experts
experts
:
FixedExperts
Readonly
mlp
mlp
:
CompiledGegluMLP
Readonly
weights
weights
:
GemmaMoeLayerWeights
Accessors
attn
get
attn
()
:
Attention
Returns
Attention
layer
Type
get
layerType
()
:
string
Returns
string
Methods
feedforward
feedforward
(
h
:
MlxArray
)
:
MlxArray
Parameters
h
:
MlxArray
Returns
MlxArray
forward
forward
(
x
:
MlxArray
,
cache
:
Cache
|
null
,
phase
:
Gemma4Phase
,
donor
:
DonorRead
|
null
,
_input
?:
MlxArray
|
null
,
)
:
{
donor
:
DonorRead
|
null
;
h
:
MlxArray
}
Parameters
x
:
MlxArray
cache
:
Cache
|
null
phase
:
Gemma4Phase
donor
:
DonorRead
|
null
_input
:
MlxArray
|
null
= null
Returns
{
donor
:
DonorRead
|
null
;
h
:
MlxArray
}
forward
Attn
forwardAttn
(
x
:
MlxArray
,
cache
:
Cache
|
null
,
phase
:
Gemma4Phase
,
donor
:
DonorRead
|
null
,
)
:
{
donor
:
DonorRead
|
null
;
h
:
MlxArray
}
Parameters
x
:
MlxArray
cache
:
Cache
|
null
phase
:
Gemma4Phase
donor
:
DonorRead
|
null
Returns
{
donor
:
DonorRead
|
null
;
h
:
MlxArray
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
experts
mlp
weights
Accessors
attn
layer
Type
Methods
feedforward
forward
forward
Attn
Documentation
mlx-bun library API
Loading...