abyss-api / README.md
KyleEastwood's picture
Upload folder using huggingface_hub
cc15101 verified
|
Raw History Blame Contribute Delete
1.52 kB
---
title: The Abyss
emoji: 🌀
colorFrom: purple
colorTo: green
sdk: docker
app_port: 7860
pinned: false
---
# The Abyss — backend (API)
FastAPI inference server for **Abyss-1**, a ~50M-parameter language model trained
from scratch (own byte-level BPE tokenizer; RoPE · RMSNorm · SwiGLU decoder),
with streaming chat + a ReAct agent, JWT user accounts, a self-hosted
safety/moderation layer, and sliding-window rate limiting.
This Space is **assembled by `deploy/hf-space/assemble.py`** in the project repo,
which stages `server/`, `ml/` (model + tokenizer) and `agent/` next to this
`Dockerfile`. The model weights are **pulled from the HF Hub at boot** (set
`ABYSS_HF_REPO`) rather than baked into the image.
## Configuration (Space → Settings)
**Variables**
- `ABYSS_HF_REPO` — HF model repo holding the checkpoint, e.g. `your-name/abyss-1`
- `ABYSS_HF_CHECKPOINT` — *(optional)* checkpoint filename (default `agent_ckpt.pt`)
- `ABYSS_CORS_ORIGINS` — *(optional)* comma-separated origin allowlist (default `*`)
**Secrets**
- `SECRET_KEY` — JWT signing key (use a long random value)
- `ABYSS_ADMIN_KEY` — unlocks `GET /v1/admin/moderation`
Leave `ABYSS_API_KEYS` **unset** to keep the API open to everyone.
## Endpoints
`GET /health` · `POST /auth/register` · `POST /auth/login` · `GET /auth/me` ·
`POST /v1/chat/completions` (SSE) · `POST /v1/agent/chat` (SSE) ·
`GET /v1/conversations` · `POST /v1/moderations`
See `DEPLOY.md` in the repository for the full step-by-step runbook.