mirror of
https://github.com/onestardao/WFGY.git
synced 2026-04-29 20:20:01 +00:00
Update example_01_basic_run.py
This commit is contained in:
parent
ecad664a93
commit
465a3c7ea7
1 changed files with 8 additions and 4 deletions
|
|
@ -1,15 +1,19 @@
|
|||
# examples/example_01_basic_run.py
|
||||
# example_01_basic_run.py
|
||||
# End-to-end smoke test
|
||||
|
||||
# ── make repo root importable ─────────────────────────────────────────────
|
||||
import pathlib, sys
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
|
||||
import numpy as np
|
||||
import wfgy_sdk as w
|
||||
|
||||
prompt = "Why don't AIs like to take showers?"
|
||||
|
||||
rng = np.random.default_rng(0)
|
||||
G = rng.normal(size=128)
|
||||
G /= np.linalg.norm(G) # unit vector
|
||||
I = G + rng.normal(scale=0.05, size=128) # small perturbation
|
||||
G = rng.normal(size=128); G /= np.linalg.norm(G)
|
||||
I = G + rng.normal(scale=0.05, size=128)
|
||||
|
||||
logits = rng.normal(size=32000)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue