autolaya
"Deploy AutoLaya and guide an end-to-end domain decision-model build: define Schema, prepare seeds/data, generate and review samples, freeze datasets, train Laya or GLiNER, evaluate, test in Playground, and deploy a local API. Use when operating, configuring, troubleshooting, or extending AutoLaya for a user."
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Badge for your README
Markdown
[](/listings/dreamblooms--jev-autolaya)HTML
<a href="/listings/dreamblooms--jev-autolaya"><img src="/api/listings/dreamblooms--jev-autolaya/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Requirements:
- Python 3.12+ - Node.js 20.19+ (22+ recommended) - 16 GB RAM; 32 GB+ recommended for training - Optional GPU: NVIDIA CUDA or AMD ROCm; CPU works for Fit and inference
Clone the repository:
git clone https://github.com/DreamBlooms/Jev-AutoLaya.git cd Jev-AutoLaya
Install and start:
./deploy.sh setup ./deploy.sh setup-laya ./deploy.sh setup-gliner # only when using GLiNER ./deploy.sh start
Hand It to Your Agent
You can also give the repository to an agent. Point it to [SKILL.md](SKILL.md) and use a prompt like:
> Read `SKILL.md` first (https://raw.githubusercontent.com/DreamBlooms/Jev-AutoLaya/refs/heads/main/SKILL.md), then help me deploy AutoLaya and build a domain decision model from real examples through Schema, generation, review, dataset creation, training, evaluation, Playground testing, and deployment. Stop and ask before destructive changes or when you need more examples.
The skill contains operating rules, safety checks, the docs map, and the end-to-end workflow.
Open <http://localhost:8000>. API docs are at <http://localhost:8000/docs>.
The first visit opens a guided walkthrough using mock data. It never modifies real projects and can be replayed from Settings → Product guide.
Configure Keys
`deploy.sh` creates `backend/.env` automatically. Add your LLM and Jev keys there:
LLM_BASE_URL=https://api.deepseek.com LLM_MODEL=deepseek-flash LLM_API_KEY=your_key # Jev through OpenRouter JEV_PROVIDER=openrouter OPENROUTER_API_KEY=your_key OPENROUTER_JEV_MODEL=~typesafe/jev-latest
You can use any OpenAI-compatible Chat Completions service. Without Jev, choose direct LLM labels or no teacher.
Restart after editing:
./deploy.sh restart
Download Models
Laya and GLiNER base models:
MODEL_SOURCE=hf MODEL_SET=base ./deploy.sh pull-models MODEL_SOURCE=hf-mirror MODEL_SET=base ./deploy.sh pull-models MODEL_SOURCE=ms MODEL_SET=base ./deploy.sh pull-models
Laya Fit models:
FIT_SOURCE=hf ./deploy.sh pull-fit FIT_SOURCE=hf-mirror ./deploy.sh pull-fit FIT_SOURCE=hf FIT_BACKBONE_SOURCE=ms ./deploy.sh pull-fit
GPU
NVIDIA CUDA:
CUDA_TORCH_INDEX=https://download.pytorch.org/whl/cu128 ./deploy.sh setup-laya CUDA_TORCH_INDEX=https://download.pytorch.org/whl/cu128 ./deploy.sh setup-gliner
For AMD ROCm or CPU, use the matching PyTorch wheel index:
LAYA_TORCH_INDEX=https://download.pytorch.org/whl/rocm6.4 ./deploy.sh setup-laya LAYA_TORCH_INDEX=https://download.pytorch.org/whl/cpu ./deploy.sh setup-laya
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 276 lines
- ---
- name: autolaya
- description: "Deploy AutoLaya and guide an end-to-end domain decision-model build: define Schema, prepare seeds/data, generate and review samples, freeze datasets, train Laya or GLiNER, evaluate, test in Playground, and deploy a local API. Use when operating, configuring, troubleshooting, or extending AutoLaya for a user."
- ---
- # AutoLaya Operator Skill
- Use this skill to operate AutoLaya safely and to guide a user from a domain description to a deployed decision model.
- ## Core Rule
- **Read the existing docs before explaining details or inventing commands.** Do not duplicate long UI instructions, API payloads, or troubleshooting tables in chat. Point to the relevant document and summarize only the decision the user needs.
- Docs map:
- | Need | Read |
- |---|---|
- | First install, keys, model download, first project | [docs/guide/getting-started.md](docs/guide/getting-started.md) |
- | Schema, seeds/import, generation, review, snapshots | [docs/guide/project-workflow.md](docs/guide/project-workflow.md) |
- | Laya/GLiNER training, evaluation, artifacts, Playground | [docs/guide/training-evaluation.md](docs/guide/training-evaluation.md) |
- | Serving, `/v1/systemone`, auth, backups | [docs/guide/deployment-api.md](docs/guide/deployment-api.md) |
- | User-facing failures and recovery | [docs/guide/troubleshooting.md](docs/guide/troubleshooting.md) |
- | Exact REST payloads and endpoints | [docs/API.md](docs/API.md) |
- | Current capabilities and limits | [docs/STATUS.md](docs/STATUS.md) |
- | Internals only when changing/debugging code | [docs/DESIGN.md](docs/DESIGN.md) |
- Chinese docs mirror these paths under `docs/guide/` and `docs/API_ZH.md`.
- ## Hand This Repository to Your Agent
- This repository is designed to be handed to an agent together with this `SKILL.md` file.
- Give the agent the repository and a prompt such as:
- > Read `SKILL.md` first (https://raw.githubusercontent.com/DreamBlooms/Jev-AutoLaya/refs/heads/main/SKILL.md), then help me deploy AutoLaya and build a domain decision model from real examples through Schema, generation, review, dataset creation, training, evaluation, Playground testing, and deployment. Stop and ask before destructive changes or when you need more examples.
- The agent should use this skill for operating rules, the docs map for details, and the user's real use case and samples for the actual project.
- ## Understand the Real Use Case First
- Before creating a project, Schema, or generation job, make sure you understand the user's actual use case:
- - What decision is being made, and what action follows from it?
- - Who consumes the answer, and what is the cost of a wrong answer?
- - What are the labels, score levels, and genuinely ambiguous cases?
- - What inputs occur in production: language, length, structure, noise, and frequency?
- - What latency, cost, and review capacity are acceptable?
- - Which real examples, existing labels, and held-out data already exist?
- If the user gives only a vague domain, ask for **5–20 real, anonymized examples** and a clear statement of how each should be judged. Prefer real examples over invented ones.
- **Data quality determines final model quality.** Synthetic data and teacher labels are starting points, not ground truth. Use human-confirmed labels, check label consistency and boundary cases, cover hard negatives, and keep real held-out data for final evaluation. Do not optimize for a fast training run at the cost of a dataset that does not represent the real use case.
- ## Safety Rules
- 1. Never print, copy, commit, or expose API keys, SSH passwords, `.env` contents, or user data.
- 2. Ask before destructive actions: deleting a project, snapshot, artifact, or deployment; overwriting `backend/.env`; resetting `data/`.
- 3. Before restarting AutoLaya, check for active jobs. Queued jobs survive a restart; running jobs may fail and need to be restarted.
- 4. Do not expose the management UI or API publicly. There is no built-in auth.
- 5. Do not claim a model, GPU path, or integration works unless it was verified in this environment.
- 6. Do not commit changes unless the user explicitly asks.
- ## First Contact
- Determine which mode the user needs:
- - **Existing deployment:** check health first; do not reinstall.
- - **Fresh local install:** follow `deploy.sh` setup.
- - **Remote deployment:** use the host, path, and credentials supplied by the user; preserve `.env`, `data/`, `models/`, and virtual environments.
- - **Build a model:** ask for the real decision, who uses it, 5–20 real examples if available, existing labels/held-out data, target model, and whether data already exists.
- ### Baseline Checks
- ```bash
- pwd
- ./deploy.sh status
- curl -s http://localhost:8000/api/health
- curl -s http://localhost:8000/api/v1/config
- ```
- If the host or port differs, use the user's actual URL.
- For active work:
- ```bash
- curl -s 'http://localhost:8000/api/v1/generation-jobs'
- curl -s 'http://localhost:8000/api/v1/training-jobs'
- curl -s 'http://localhost:8000/api/v1/evaluations'
- ```
- ## Deployment Playbook
- Only deploy what is needed. Do not reinstall runtimes when they are already ready.
- ```bash
- ./deploy.sh setup
- ./deploy.sh setup-laya
- ./deploy.sh setup-gliner # only when GLiNER is required
- ./deploy.sh start
- ```
- Model downloads:
- ```bash
- MODEL_SOURCE=hf MODEL_SET=base ./deploy.sh pull-models
- FIT_SOURCE=hf ./deploy.sh pull-fit
- ```
- GPU install uses the matching PyTorch wheel index. See the quick-start guide rather than guessing a wheel URL.
- After deployment:
- ```bash
- ./deploy.sh status
- curl -s http://localhost:8000/api/health
- curl -s http://localhost:8000/api/v1/config
- ```
- Confirm `llmConfigured`, `jevConfigured`, `availableDevices`, `layaRuntimeReady`, and `glinerRuntimeReady` before starting a model workflow.
- ### Remote Sync
- - Preserve `backend/.env`, `data/`, `models/`, `backend/.venv`, `backend/laya-venv`, and `backend/gliner-venv`.
- - Sync application code and built assets, restart, then repeat health/config checks.
- - Do not copy local secrets to a remote host unless the user asks.
- - Do not run a remote restart while jobs are active without confirmation.
- ## Full Build Checklist
- Use the UI or API. Prefer the API when the user wants repeatable automation.
- ### 1. Project and Schema
- - Create one project for one domain.
- - Add at least one `Choice`, `Noul`, or `Score` question.
- - Validate keys are unique and options are meaningful.
- - Detail: [project workflow](docs/guide/project-workflow.md).
- ### 2. Seeds and Samples
- - Add 5–20 real seeds when possible.
- - Use JSONL/CSV templates for bulk input.
- - Imported rows remain `pending`.
- - Real held-out data must be marked as held out.
- - Detail: [seeds and import](docs/guide/project-workflow.md).
- ### 3. Generate Data
- - Choose Jev Teacher, direct LLM labels, or no teacher.
- - Set count, languages, difficulty mix, negative ratio, and label balancing.
- - Advanced options include custom prompt, Think budget, Think level, and temperature.
- - Preview the LLM request before launching a large job.
- - Detail: [generation](docs/guide/project-workflow.md).
- ### 4. Human Review
- - Every question needs an answer before acceptance.
- - Use batch accept only after spot-checking quality.
- - Reject bad samples with a reason.
- - Do not skip review for production data.
- - Detail: [review](docs/guide/project-workflow.md).
- ### 5. Freeze Dataset
- - Confirm accepted samples are complete.
- - Freeze a snapshot and verify split counts and label distribution.
- - Require real held-out data for formal evaluation.
- - Detail: [freeze a dataset](docs/guide/project-workflow.md).
- ### 6. Train
- - Start with Laya Fit for a baseline.
- - Fine-tune Laya when data and hardware justify it.
- - GLiNER is fine-tune only.
- - Confirm the runtime and device before launching.
- - Detail: [training](docs/guide/training-evaluation.md).
- ### 7. Evaluate
- - Evaluate on validation/test rows, not training rows.
- - Compare Base, Fit, fine-tuned, and optionally Jev.
- - Use “More” to select historical trained versions.
- - Prefer held-out results over training loss.
- - Detail: [evaluation](docs/guide/training-evaluation.md).
- ### 8. Test in Playground
- - Use Playground for single-input checks without creating datasets or jobs.
- - Use project Schema, presets, or a custom editable Schema.
- - State may be a string, object, or array.
- - Export a SystemOne cURL when the user needs an integration example.
- - Detail: [Playground](docs/guide/training-evaluation.md).
- ### 9. Deploy and Verify
- - Deploy the selected artifact.
- - Confirm `/health`.
- - Call `/v1/systemone` with the same questions used during training.
- - For GLiNER, call `/v1/classify` or the compatible mapping.
- - Detail: [deployment](docs/guide/deployment-api.md).
- ## API Quick Reference
- Base URL:
- ```text
- http://localhost:8000/api/v1
- ```
- Use [docs/API.md](docs/API.md) for request bodies and response fields. The most common workflow endpoints are:
- ```text
- POST /projects
- POST /projects/{id}/questions
- POST /projects/{id}/seeds
- POST /projects/{id}/samples/import
- POST /projects/{id}/generate
- GET /generation-jobs/{id}/events
- POST /samples/{id}/accept
- POST /projects/{id}/datasets
- POST /training-jobs
- GET /training-jobs/{id}/events
- POST /evaluations
- POST /playground/run
- POST /deployments
- ```
- Rules:
- - Use the API for repeatable automation.
- - Do not poll aggressively; use SSE event endpoints for long jobs.
- - Playground and base-model loading can take 10–60 seconds.
- - Treat model execution as serialized; do not launch overlapping GPU-heavy runs.
- ## Decision Guide
- ### “Deploy this for me”
- -> Follow the deployment playbook, verify health/config, stop before creating data unless asked.
- ### “Build a model from this domain”
- -> Get the domain and schema first. Then project → Schema → seeds → generation → review → snapshot → Fit → evaluation → deploy.
- ### “Test this text/model”
- -> Use Playground. Do not create training data just to test one input.
- ### “Why is training/evaluation bad?”
- -> Check data size, label quality, held-out leakage, selected base, and whether the correct snapshot/artifact was used. Read evaluation output before changing parameters.
- ### “Add/fix a feature”
- -> Read [DESIGN.md](docs/DESIGN.md) only for internals. Inspect current routes and tests. Run:
- ```bash
- cd backend && .venv/bin/ruff check . && .venv/bin/pytest
- cd frontend && npm run typecheck && npm run build
- ```
- ## Completion Criteria
- Before telling the user the workflow is complete, verify:
- - the real use case and decision boundary are clear;
- - project has a valid Schema;
- - real examples and held-out data were used where possible;
- - generated samples and labels were reviewed and confirmed;
- - snapshot exists and contains held-out data;
- - training job completed and an artifact exists;
- - evaluation used validation/test rows;
- - deployment health check passes;
- - a real inference request returns answers;
- - no secrets or user data were exposed.
README.md · README · 181 lines
- # AutoLaya
- [简体中文](README_ZH.md) | English
- **AutoLaya** is a local-first tool for building domain decision models. It turns a domain description and a few real examples into a Laya or GLiNER model that you can train, evaluate, and deploy yourself.
- <img width="1920" height="980" alt="img-welcome" src="https://github.com/user-attachments/assets/f63323a5-e757-4aee-a820-2f9b48d2a4f2" />
- ```text
- domain description / seed examples
- → LLM-generated domain text
- → Jev / LLM / human labels
- → human review
- → frozen dataset
- → train Laya / GLiNER
- → evaluate on held-out rows
- → deploy a local decision API
- ```
- <img width="1920" height="980" alt="img-s1" src="https://github.com/user-attachments/assets/5432c848-f52b-4a15-aaf4-a36709e6e70f" />
- Everything happens in one web workspace. You do not need to write training scripts or send business data to a managed training platform.
- ## What You Can Do
- - **Define the domain and Schema:** use Choice, Noul, and Score questions.
- - **Prepare data:** add examples manually, import JSONL/CSV, generate with an LLM, or import real held-out data.
- - **Label automatically:** use Jev Teacher, direct LLM weak labels, or fully manual labels.
- - **Review:** edit, accept, reject, and batch-process samples.
- - **Manage datasets:** freeze immutable snapshots and download Canonical, Laya, or GLiNER JSONL.
- - **Train models:** Laya Fit + calibration, Laya fine-tuning, and GLiNER2.5 fine-tuning.
- - **Evaluate models:** compare Base, Fit, and fine-tuned models, including historical training versions.
- - **Test models:** edit Schema and State freely in the Playground and compare models.
- - **Deploy models:** start local services and call the Jev-compatible `/v1/systemone`.
- - **Export requests:** generate a complete SystemOne cURL request from the Playground.
- ## Quick Start
- Requirements:
- - Python 3.12+
- - Node.js 20.19+ (22+ recommended)
- - 16 GB RAM; 32 GB+ recommended for training
- - Optional GPU: NVIDIA CUDA or AMD ROCm; CPU works for Fit and inference
- Clone the repository:
- ```bash
- git clone https://github.com/DreamBlooms/Jev-AutoLaya.git
- cd Jev-AutoLaya
- ```
- Install and start:
- ```bash
- ./deploy.sh setup
- ./deploy.sh setup-laya
- ./deploy.sh setup-gliner # only when using GLiNER
- ./deploy.sh start
- ```
- ### Hand It to Your Agent
- You can also give the repository to an agent. Point it to [SKILL.md](SKILL.md) and use a prompt like:
- > Read `SKILL.md` first (https://raw.githubusercontent.com/DreamBlooms/Jev-AutoLaya/refs/heads/main/SKILL.md), then help me deploy AutoLaya and build a domain decision model from real examples through Schema, generation, review, dataset creation, training, evaluation, Playground testing, and deployment. Stop and ask before destructive changes or when you need more examples.
- The skill contains operating rules, safety checks, the docs map, and the end-to-end workflow.
- Open <http://localhost:8000>. API docs are at <http://localhost:8000/docs>.
- The first visit opens a guided walkthrough using mock data. It never modifies real projects and can be replayed from Settings → Product guide.
- ### Configure Keys
- `deploy.sh` creates `backend/.env` automatically. Add your LLM and Jev keys there:
- ```env
- LLM_BASE_URL=https://api.deepseek.com
- LLM_MODEL=deepseek-flash
- LLM_API_KEY=your_key
- # Jev through OpenRouter
- JEV_PROVIDER=openrouter
- OPENROUTER_API_KEY=your_key
- OPENROUTER_JEV_MODEL=~typesafe/jev-latest
- ```
- You can use any OpenAI-compatible Chat Completions service. Without Jev, choose direct LLM labels or no teacher.
- Restart after editing:
- ```bash
- ./deploy.sh restart
- ```
- ### Download Models
- Laya and GLiNER base models:
- ```bash
- MODEL_SOURCE=hf MODEL_SET=base ./deploy.sh pull-models
- MODEL_SOURCE=hf-mirror MODEL_SET=base ./deploy.sh pull-models
- MODEL_SOURCE=ms MODEL_SET=base ./deploy.sh pull-models
- ```
- Laya Fit models:
- ```bash
- FIT_SOURCE=hf ./deploy.sh pull-fit
- FIT_SOURCE=hf-mirror ./deploy.sh pull-fit
- FIT_SOURCE=hf FIT_BACKBONE_SOURCE=ms ./deploy.sh pull-fit
- ```
- ### GPU
- NVIDIA CUDA:
- ```bash
- CUDA_TORCH_INDEX=https://download.pytorch.org/whl/cu128 ./deploy.sh setup-laya
- CUDA_TORCH_INDEX=https://download.pytorch.org/whl/cu128 ./deploy.sh setup-gliner
- ```
- For AMD ROCm or CPU, use the matching PyTorch wheel index:
- ```bash
- LAYA_TORCH_INDEX=https://download.pytorch.org/whl/rocm6.4 ./deploy.sh setup-laya
- LAYA_TORCH_INDEX=https://download.pytorch.org/whl/cpu ./deploy.sh setup-laya
- ```
- ## First Use
- 1. Open AutoLaya and finish the first-visit guide.
- 2. Create a project and choose its languages.
- 3. Add Choice, Noul, or Score questions in Schema.
- 4. Add seeds or import JSONL/CSV from a template.
- 5. Generate data and review the results.
- 6. Freeze a dataset.
- 7. Train Laya or GLiNER.
- 8. Compare models in Evaluation and test inputs in the Playground.
- 9. Deploy from Models to get a local `/v1/systemone` URL.
- See [Getting Started](docs/guide/en/getting-started.md) for the full walkthrough.
- ## Documentation
- | Document | Contents |
- |---|---|
- | [User Guide](docs/guide/en/README.md) | Complete usage guide |
- | [Getting Started](docs/guide/en/getting-started.md) | Install, configure, start, and build the first project |
- | [Project & Data Workflow](docs/guide/en/project-workflow.md) | Schema, seeds, generation, review, datasets |
- | [Training & Evaluation](docs/guide/en/training-evaluation.md) | Laya, GLiNER, evaluation, artifacts, Playground |
- | [Deployment & API](docs/guide/en/deployment-api.md) | Deploy, call endpoints, backup, security |
- | [Troubleshooting](docs/guide/en/troubleshooting.md) | Common problems and fixes |
- | [API Reference](docs/API.md) | Complete interface reference for integrations |
- | [Design](docs/DESIGN.md) | Architecture and design record |
- ## Operations
- ```bash
- ./deploy.sh start
- ./deploy.sh status
- ./deploy.sh logs
- ./deploy.sh restart
- ./deploy.sh stop
- ```
- Back up at least:
- - `backend/.env`
- - `data/autolaya.db`
- - `data/datasets/`
- - `data/artifacts/`
- - `models/` if you do not want to download them again
- ## Known Limitations
- - The management API has no built-in login or authentication; do not expose it publicly.
- - Multi-label decisions are not supported; use multiple Noul questions instead.
- - GLiNER provides labels and confidence, not full calibrated probabilities.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.