SLM__Recipe / README.md
udaygs210
Adding recepie changes
1461fe5
|
Raw
History Blame Contribute Delete
1.51 kB

A newer version of the Gradio SDK is available: 6.22.0

Upgrade
metadata
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:
    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.