File size: 1,220 Bytes
385fc44 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | # Testing Your Exported Model
This bundle contains a fully runnable bigram language model. No GPU,
no external dependencies - Python 3.8+ standard library only.
## Files
| File | Purpose |
|------|---------|
| `model.json` | The trained model (transitions + config + metrics) |
| `test.py` | Interactive chat wrapper |
| `test.sh` | Test harness (validates + generates samples) |
| `run.sh` | Minimal launcher for test.py |
## Quick Start
### macOS / Linux
```bash
chmod +x test.sh run.sh
./test.sh
```
### Windows (PowerShell)
```powershell
python test.py
```
### One-shot generation
```bash
python3 test.py alice
# => alice… (seed-dependent continuation)
```
### Custom temperature
```bash
python3 test.py --temperature 0.5
python3 test.py alice --temperature 1.2
```
## Manual Test
```bash
python3 -c "import json; m=json.load(open('model.json')); print(len(m['vocab']), 'tokens,', len(m['transitions']), 'states')"
```
Expected output: `<N> tokens, <M> states`.
## Troubleshooting
- **`python3 not found`** - install Python 3.8+ from https://python.org
- **`model.json not found`** - make sure you are inside the extracted directory
- **`Permission denied`** - run `chmod +x test.sh run.sh` first
|