网页
综合
更新时间 2026-11-14 10:05:24
GptOssBackbone model
自动蜘蛛
keras.io
正文约 1312 字
A GPT-style Transformer with a Mixture of Experts.
This network implements a GPT-style decoder network with Mixture of Expert (MoE) layers, similar to the architecture described in "Mixtral of Experts" but with customizations found in some open-source GPT models. It includes the embedding lookups and transformer layers.
The default constructor gives a fully customizable, randomly initialized GptOss model with any number of layers, heads, and embedding dimensions. To load preset architectures and weights, use the from_preset constructor.
Instantiate a keras_hub.models.Backbone from a model preset.
A preset is a directory of configs, weights and other file assets used to save and load a pre-trained model. The preset can be passed as a one of:
This constructor can be called in one of two ways. Either from the base class like keras_hub.models.Backbone.from_preset(), or from a model class like keras_hub.models.GemmaBackbone.from_preset(). If calling from the base class, the subclass of the returning object will be inferred from the config in the preset directory.
For any Backbone subclass, you can run cls.presets.keys() to list all built-in presets available on the class.
A keras.layers.Embedding instance for embedding token ids.
This layer embeds integer token ids to the hidden dim of the model.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。