Slayer1B-1.09-Instruct-26.11: weights, card, notes, training code, manifests and results (history squashed; training data not published)
6071ec5 Download training/code/demo_math.py from SlayerLab/Slayer1B-1.09-Instruct-26.11: direct link, hf CLI and curl.
- Browser
- Download file 1.25 kB
-
https://huggingface.co/SlayerLab/Slayer1B-1.09-Instruct-26.11/resolve/main/training/code/demo_math.py
- Command line
-
hf download hf://SlayerLab/Slayer1B-1.09-Instruct-26.11/training/code/demo_math.py
-
curl -L -o demo_math.py https://huggingface.co/SlayerLab/Slayer1B-1.09-Instruct-26.11/resolve/main/training/code/demo_math.py
1.25 kB
| import sys, torch | |
| from tokenizers import Tokenizer | |
| from chatfmt import Fmt | |
| from evals import Runner | |
| from model_io import load | |
| m, cfg, _ = load(sys.argv[1], device="cuda", dtype=torch.bfloat16, trainer_path="/workspace/ckpt/train_gpt_ref_r24_2.py"); m.eval() | |
| f = Fmt(Tokenizer.from_file("/workspace/ckpt/tokenizer.json")); r = Runner(m, f, 500) | |
| P = ["Pociąg wyjeżdża z Warszawy o 8:15 i jedzie do Krakowa ze średnią prędkością 120 km/h. Odległość wynosi 300 km. O której godzinie dojedzie? Pokaż obliczenia.", | |
| "Kasia ma 3 razy więcej jabłek niż Tomek. Razem mają 48 jabłek. Ile jabłek ma każde z nich? Wyjaśnij krok po kroku.", | |
| "Sklep obniżył cenę kurtki o 20%, a potem nową cenę podniósł o 20%. Czy kurtka kosztuje teraz tyle samo co na początku? Uzasadnij.", | |
| "A rectangle has a perimeter of 36 cm and its length is twice its width. What is its area? Show your reasoning.", | |
| "If 5 machines make 5 widgets in 5 minutes, how long would 100 machines take to make 100 widgets? Explain.", | |
| "What is the sum of all integers from 1 to 100? Explain the method."] | |
| for p in P: | |
| t, why = r.reply([{"role": "user", "content": p}]) | |
| print("=== USER:", p, "\n--- SLAYER:", t.strip(), f"[{why}]\n", flush=True) | |