Spaces:
Sleeping
Sleeping
| title: SLM 264M Data Transformer | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: gradio | |
| sdk_version: 5.9.1 | |
| app_file: app.py | |
| pinned: false | |
| # SLM-264M Data Transformer β demo Space | |
| A Gradio front-end for the `slm-264m` data-transformer fine-tune: convert data between | |
| **CSV, JSON, and XML** with a 264M-parameter model trained from scratch, running on CPU. | |
| ## How it's wired | |
| - **Code lives here** (`app.py`, `model.py`). | |
| - **Weights live in the model repo** and are downloaded at startup with | |
| `huggingface_hub.hf_hub_download`. Set the repo in `app.py`: | |
| ```python | |
| MODEL_REPO = "uday210/slm-recipe-264m" # your fine-tune | |
| CKPT_FILENAME = "slm-recipe-final.pt" | |
| TOKENIZER_FILENAME = "tokenizer.json" | |
| ``` | |
| - If the model repo is **private**, add an `HF_TOKEN` secret under | |
| *Settings β Variables and secrets*. | |
| ## Files you must add | |
| 1. **`model.py`** β copy it from your training repo. This Space cannot load the checkpoint | |
| without your exact `GPT`/`GPTConfig` classes (custom GQA + RoPE architecture). | |
| It must be import-safe (no training at file top level). | |
| 2. Make sure the model repo actually contains the checkpoint and `tokenizer.json`. | |
| ## Notes / limits | |
| - CPU inference: a few tok/s. Fine for a demo. For speed, upgrade the Space hardware or | |
| wire in the KV-cache generation path from your deployment notes. | |
| - The prompt template in `app.py` must match how the fine-tune was trained. | |
| - Numeric transcription is the model's known weak spot; structure and text are reliable. |