Skip to content
Back to skills

Layers And Models

ASecurity

"Use FLA layer, module, and Transformers model APIs for attention

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
developmentpythonbashapibackend

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill layers-and-models --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Layers And Models?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Layers And Models
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-layers-and-models/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-layers-and-models)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: layers-and-models
description: "Use FLA layer, module, and Transformers model APIs for attention
  replacement, model construction, generation, training, and evaluation
  workflows."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# FLA Layers and Models

Use this sub-skill when the task is about constructing or smoke-checking Flash Linear Attention (FLA) layers, fused modules, or Transformers-compatible causal language models.

## Route here for

- Replacing a standard token-mixing or self-attention block with an FLA layer from `fla.layers`, such as `GatedLinearAttention` or `KimiDeltaAttention`.
- Building a tiny or production FLA model with `transformers.AutoModelForCausalLM.from_config(...)` and config classes from `fla.models`.
- Understanding hybrid attention plans through a model config's `attn` field.
- Using fused modules such as `RMSNorm` or `FusedLinearCrossEntropyLoss` in model/loss code.
- Planning generation, training, or evaluation flows for FLA models while identifying network, dataset, checkpoint, and GPU requirements.

## Do not route here for

- Kernel implementation internals, backend dispatch, Triton/Gluon/TileLang/CUDA/NPU optimization, or operator benchmark loops.
- Full repository contribution readiness or PR packaging.
- Native test execution. This sub-skill only provides safe API smoke helpers and distilled runtime guidance.

## Minimal workflow

1. Read `references/api-reference.md` for import surfaces, verified signatures, config knobs, return shapes, and known constraints.
2. Read `references/model-workflows.md` for attention replacement, tiny `AutoModelForCausalLM.from_config` construction, hybrid attention plans, fused losses, generation, training, and evaluation recipes.
3. If something fails to import, instantiate, or generate, consult `references/troubleshooting.md` before changing code.
4. For a safe local sanity check that avoids downloads and native test suites, run from this sub-skill directory:

```bash
python scripts/smoke_layer_model.py --help
python scripts/smoke_layer_model.py --device cpu
```

Use `--device cuda --require-cuda` only when CUDA is intentionally part of the check.

## Import rule of thumb

Import config classes from `fla.models`, not from top-level `fla`:

```python
from fla.models import GLAConfig, KDAConfig
from transformers import AutoModelForCausalLM

model = AutoModelForCausalLM.from_config(GLAConfig())
```

Top-level `fla` exports many layer/model classes when optional imports succeed, but it deliberately omits names ending in `Config`.

Files in this skill

  • SKILL.md2.5 KB
  • references/api-reference.md4.9 KB
  • references/model-workflows.md10.6 KB
  • references/troubleshooting.md4.5 KB
  • scripts/smoke_layer_model.py3.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.