The dataset viewer is not available for this split.
Error code: TooBigContentError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Safetensors Studio & Bench
Run, test, and benchmark local Safetensors models with surgical VRAM observability.
Safetensors Studio & Bench is a full-stack, local-first platform to load any *.safetensors + config.json + tokenizer.json folder, stream chat with real TPS/TTFT, run automated benchmarks (Reasoning/Coding/Arabic/Summarization), and profile GPU/CPU/RAM live β no cloud required.
π Arabic README: README_AR.md | π Docs: docs/ | π€ Contribute: CONTRIBUTING.md
β¨ Key Features
| Area | What you get |
|---|---|
| Safetensors Loader | Local folder picker β’ Float16 / Bfloat16 / Float32 β’ 4-bit NF4 / 8-bit via bitsandbytes β’ device_map: auto / balanced / cpu / cuda:0 + offloading |
| Live Playground | Token Streaming (SSE) β’ Real Tokens/sec & TTFT β’ Temperature / Top-P / Max Tokens β’ Copy & clear |
| Automated Benchmark | 15 preset tasks: Reasoning (4), Coding (4), Arabic Quality (4), Summarization (3) β’ Exact / Regex / LLM-as-Judge β’ Custom datasets: drop any folder with .csv/.json/.jsonl/.txt/.md β auto-detects language (Arabic/English) & category |
| Hardware Profiling | pynvml + psutil β live VRAM/CPU/RAM/Power via Recharts β’ VRAM peak timeline β’ TPS vs VRAM scatter β’ 600-point history |
| Reports & Sharing | Export PDF (Arabic-capable) / JSON / CSV β’ Shareable link /share/{token} β’ Full tables + by_category insights |
π Supported Languages
| Language | Coverage |
|---|---|
| English | UI, prompts, docs, code, benchmarks (Reasoning, Coding, Summarization) |
| Arabic (Ψ§ΩΨΉΨ±Ψ¨ΩΨ©) | Full UI RTL, benchmarks (Arabic Quality, Summarization), PDF with tahoma.ttf + arabic-reshaper, auto-detection \u0600-\u06FF for custom datasets |
| Mixed | Auto language_counts: {ar, en} per folder, per report |
Add a new language: add prompts to
backend/app/benchmark.py:14and categories todataset_parser.py:11. SeeSUPPORTED_LANGUAGES.md.
π Quick Start
1. Requirements
- Node 22+ / Python 3.12+
- 8GB RAM minimum (CPU mode), 12GB+ VRAM recommended for 7B models on GPU
2. Backend
cd backend
pip install -r requirements.txt # torch CPU + transformers are included
# optional GPU: pip install torch --index-url https://download.pytorch.org/whl/cu121
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
# β http://localhost:8000/docs
3. Frontend
cd frontend
npm install
npm run dev
# β http://localhost:3000
# env: frontend/.env.local β NEXT_PUBLIC_API_URL=http://localhost:8000
4. Docker (alternative)
docker compose up --build
# frontend http://localhost:3000 backend http://localhost:8000
5. Load a model
- Place a HF-style folder anywhere, e.g.
C:\models\mistral-7bcontainingmodel.safetensors,config.json,tokenizer.json - In UI
/or/modelsor new: top bar of/benchmarkβ paste path βValidateβLoad - Or via API:
POST /api/model/load {"model_path":"C:\\models\\my-model","dtype":"float16","quantization":"4bit","device_map":"auto"}
No GPU? The platform auto-enters Demo Mode (simulated generation) so you can still test all features.
π Project Structure
backend/app/
main.py # FastAPI + CORS + routers
model_manager.py # Safetensors loader (torch dtype/quant/device_map)
telemetry.py # pynvml/psutil + 600-point history
benchmark.py # 15 tasks + evaluate_answer()
dataset_parser.py # CSV/JSON/JSONL/TXT/MD β BenchmarkTask + lang detect
schemas.py
routers/{model,inference,telemetry,benchmark,custom_benchmark,share,export}.py
frontend/src/
app/{page, playground, benchmark, hardware, models, share/[token]}
components/{ModelLoader, ModelPathSelector, Playground, BenchmarkPanel, CustomDatasetPanel, TelemetryCharts}
lib/{api.ts, utils.ts}
example_dataset/ # 9-task mixed sample (AR/EN)
docs/ # English developer docs
π API Reference (core)
| Method | Path | Description |
|---|---|---|
POST |
/api/model/load |
Load Safetensors folder |
GET |
/api/model/status |
Loaded info |
GET |
/api/model/validate?path= |
Check *.safetensors + config.json |
POST |
/api/generate (SSE) |
Stream tokens with ttft_ms, tokens_per_sec |
GET |
/api/telemetry/ |
Snapshot (VRAM/GPU/CPU/RAM) |
WS |
/ws/telemetry |
Live push (fallback to HTTP polling) |
POST |
/api/benchmark/run |
Sync benchmark (blocking) |
POST |
/api/benchmark/run-stream |
SSE progress (type: progress/task_done/done) |
POST |
/api/benchmark/custom/scan?folder_path= |
Scan custom folder |
POST |
/api/benchmark/custom/run-from-folder |
Run on custom folder |
POST |
/api/benchmark/custom/upload |
Multipart upload |
POST |
/api/share/{report_id} |
Create share token |
GET |
/api/share/{token} |
Fetch shared report |
GET |
/api/export/{json,csv,pdf}?report_id= |
Export |
Full spec: http://localhost:8000/docs
π§ͺ Benchmark Suites
| Suite | Tasks | Judge |
|---|---|---|
reasoning |
arithmetic, sequence, logic puzzle, fraction | Regex \b7\b |
coding |
fibonacci, loop output, reverse_string, sorted | Regex def\s+ |
arabic |
spelling, synonym, i'rab, summarization | Regex Ψ°ΩΨ¨Ψͺ, ΩΨ±Ψ |
summarization |
tech text, Transformer, bullet points | Regex 7 Ω
ΩΩΨ§Ψ± |
Custom folder example (CSV):
prompt,expected,expected_regex,category,name
"Ω
Ψ§ Ω
Ψ±Ψ§Ψ―Ω Ψ³ΨΉΩΨ―Ψ",ΩΨ±Ψ,ΩΨ±Ψ,arabic,syn
π Hardware Profiling
telemetry.py:19pollspynvml.nvmlDeviceGetMemoryInfo+psutil.virtual_memoryevery 1.2sRechartsArea/Line/Scatter: VRAM timeline, CPU/RAM %, Power vs VRAM, TPS vs VRAMvram_peak_mbtracked per task and globally
π Export & Sharing
- PDF: Unicode via
tahoma.ttf+arabic-reshaper+python-bidi(fallback to?sanitization) - Share: in-memory
share_store[token]=report_idβ/share/{token}page
π οΈ Development
See docs/DEVELOPMENT.md and docs/ARCHITECTURE.md.
# Frontend
npm run build # production
npm run lint
# Backend
python -m pytest # (add tests)
pip install -r requirements.txt
π€ Hugging Face
- Use any HF model: download
snapshotsand pointmodel_pathto it. - Model card template:
docs/HUGGINGFACE.md - Dataset parser auto-handles HF
datasetsexported as JSONL/CSV.
π€ Contributing
Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md. PRs for new languages, benchmarks, and quant backends are welcome!
π Security
See SECURITY.md.
π License
MIT β see LICENSE.
Built with β€οΈ for local AI β no cloud, full control.
- Downloads last month
- 7