Archived
laya: a recipe rounding the release's f16 linears to bf16
This commit is contained in:
1 parent
213aff9753
commit
cc58402b71
2 files changed
+25
-2
No files matched your search
@@ -0,0 +1,21 @@
|
||||
# laya-bf16.recipe -- Convai Innovations' Laya (laya, laya-typed-decisions, laya-multilingual) for the
|
||||
# laya plugin (arch/laya).
|
||||
#
|
||||
# rad-convert convaiinnovations/laya-typed-decisions --recipe data/recipes/laya-bf16.recipe \
|
||||
# -o laya-typed-decisions.rad
|
||||
#
|
||||
# The release ships f16. The plugin reads its linears and tables in bf16, as the release computes them
|
||||
# on a card under bf16 autocast, and f16 to bf16 rounds, so it is a rule here. Norms and biases are
|
||||
# declared f32, an exact widening of f16, and no rule names them.
|
||||
token_embd.weight cast dtype=bf16
|
||||
type_emb.weight cast dtype=bf16
|
||||
scorer.fc1.weight cast dtype=bf16
|
||||
scorer.fc2.weight cast dtype=bf16
|
||||
blk.*.attn_qkv.weight cast dtype=bf16
|
||||
blk.*.attn_out.weight cast dtype=bf16
|
||||
blk.*.ffn_in_gate.weight cast dtype=bf16
|
||||
blk.*.ffn_down.weight cast dtype=bf16
|
||||
head.*.attn_qkv.weight cast dtype=bf16
|
||||
head.*.attn_out.weight cast dtype=bf16
|
||||
head.*.ffn_up.weight cast dtype=bf16
|
||||
head.*.ffn_down.weight cast dtype=bf16
|
||||
+4
-2
@@ -2851,7 +2851,8 @@ runs the encoder and head in the `laya` plugin (`arch/laya`), on the embedding p
|
||||
every question of a request in one step, each answered in its pooled row.
|
||||
|
||||
```sh
|
||||
rad-convert /srv/models/laya-typed-decisions -o laya-typed-decisions.rad --set decision.type=laya
|
||||
rad-convert /srv/models/laya-typed-decisions -o laya-typed-decisions.rad --set decision.type=laya \
|
||||
--recipe data/recipes/laya-bf16.recipe
|
||||
radiance --model laya-typed-decisions.rad --port 8000
|
||||
```
|
||||
|
||||
@@ -2859,7 +2860,8 @@ rad-convert reads the release's folders: `encoder/config.json` for the geometry,
|
||||
`rl_agent_config.json` for the sequence budget and the fitted temperatures, and `tokenizer/`. The
|
||||
checkpoint's `config.json` already says `model_type: laya`, so `--set decision.type=laya` is
|
||||
optional. A checkpoint as the `laya` package downloads it, with no `config.json` of its own,
|
||||
converts the same way.
|
||||
converts the same way. The release ships f16 weights, and the recipe rounds the linears and tables
|
||||
to bf16, which is how the release computes them on a card.
|
||||
|
||||
The request and the response are the same as d1's above. What differs:
|
||||
|
||||
|
||||
Reference in new issue
Block a user