Realm

Nlp Bpe Gru

Runnable OA SDK tutorial.

Rust · Python

Example

1#[path = "../_bpe_common.rs"]
2mod _bpe_common;
3
4fn main() -> oa::Result<()> {
5 _bpe_common::run(
6 _bpe_common::Tutorial {
7 title: "OA Tutorial — BPE GRU · all-position LM (autograd)",
8 description: "BPE Embedding → GRU(32→64) → Linear(64→320)",
9 timer_name: "bpe_gru_training_step",
10 checkpoint_stem: "oars_bpe_gru",
11 learning_rate: 0.01,
12 expected_loss: oasdk::ml::nlp::BPE_GRU_FINAL_LOSS,
13 expected_accuracy: oasdk::ml::nlp::BPE_GRU_ACCURACY,
14 expected_generation: oasdk::ml::nlp::BPE_GRU_REFERENCE_GENERATION,
15 },
16 oasdk::ml::nlp::BpeGru::new,
17 )
18}
19

Run Rust tutorials from the OA SDK checkout with cargo run --release --example <name>. Run Python with the environment containing the OA native extension. Consult each program's arguments and capability checks before running it.