Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- video-editing
|
| 7 |
+
- instruction-following
|
| 8 |
+
- structured-generation
|
| 9 |
+
- text-to-json
|
| 10 |
+
- ffmpeg
|
| 11 |
+
- gearcut
|
| 12 |
+
- sparse-transformer
|
| 13 |
+
pipeline_tag: text-generation
|
| 14 |
+
inference: false
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# GearCut Editor (gc_editor)
|
| 18 |
+
|
| 19 |
+
**gc_editor** is a compact instruction-to-operations model that powers
|
| 20 |
+
GearCut, an ultra-lightweight, FFmpeg-based
|
| 21 |
+
video editor. It translates a plain-English editing instruction into a list of
|
| 22 |
+
structured editing **operations** (JSON) that GearCut's `project -> ffmpeg`
|
| 23 |
+
compiler then executes. It is designed to run **locally, on CPU**, so the editor
|
| 24 |
+
needs no cloud service and no user video ever leaves the machine.
|
| 25 |
+
|
| 26 |
+
Developed by **AMEFORGE**. Built on the in-house **SparseMind** architecture
|
| 27 |
+
(sparse attention + sparse FFN, dynamic neuron typing, and episodic memory).
|
| 28 |
+
|
| 29 |
+
## What it does
|
| 30 |
+
|
| 31 |
+
- **Input:** the current timeline state + a natural-language instruction.
|
| 32 |
+
- **Output:** a JSON array of editing operations.
|
| 33 |
+
|
| 34 |
+
```text
|
| 35 |
+
INPUT
|
| 36 |
+
clips: c1=intro.mp4(0.0-8.0) | remove the first 3 seconds of the clip =>
|
| 37 |
+
|
| 38 |
+
OUTPUT
|
| 39 |
+
[{"op":"trim","clip":"c1","in":3.0,"out":8.0}]
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
Supported operations (v1): `trim`, `split`, `import`, `append`, `delete`,
|
| 43 |
+
`reorder`, `export`.
|
| 44 |
+
|
| 45 |
+
## Model details
|
| 46 |
+
|
| 47 |
+
| | |
|
| 48 |
+
|---|---|
|
| 49 |
+
| Architecture | SparseMind (decoder-only, sparse) |
|
| 50 |
+
| Parameters | 8,132,608 (~8.1M) |
|
| 51 |
+
| Hidden size / layers | 256 / 6 |
|
| 52 |
+
| Context length | 256 tokens |
|
| 53 |
+
| Tokenizer | GearCut dedicated SentencePiece-BPE, vocab 682 |
|
| 54 |
+
| Precision | fp32 |
|
| 55 |
+
|
| 56 |
+
## Evaluation
|
| 57 |
+
Model set with use diversity= false
|
| 58 |
+
Measured on a held-out synthetic validation split. The meaningful metrics are
|
| 59 |
+
not perplexity but whether the generated operations are usable:
|
| 60 |
+
|
| 61 |
+
| Metric | Score |
|
| 62 |
+
|---|---|
|
| 63 |
+
| Valid JSON | 100.0% |
|
| 64 |
+
| Exact match (operations == reference) | 88.8% |
|
| 65 |
+
| Best exact match during training | 87.5% |
|
| 66 |
+
|
| 67 |
+
## Training data
|
| 68 |
+
|
| 69 |
+
Trained on **60,000** synthetically generated `(timeline + instruction -> operations)`
|
| 70 |
+
examples for 3000 steps. The generator covers the v1 operation set with
|
| 71 |
+
varied phrasings, clip references, file names, timestamps, and presets.
|
| 72 |
+
|
| 73 |
+
## Intended use & scope
|
| 74 |
+
|
| 75 |
+
Intended as the natural-language command layer inside the GearCut editor. It is
|
| 76 |
+
**not** a general-purpose assistant and only emits GearCut operations.
|
| 77 |
+
|
| 78 |
+
## Limitations
|
| 79 |
+
|
| 80 |
+
- **Synthetic training data.** The model is strongest on phrasings close to the
|
| 81 |
+
generator's templates. Unusual real-world wording may be handled less reliably
|
| 82 |
+
until the data is expanded with real examples.
|
| 83 |
+
- **English only (v1).** A bilingual (EN/FR) version is planned.
|
| 84 |
+
- **Narrow operation set (v1).** Transitions, multi-track, and effects are not
|
| 85 |
+
yet covered.
|
| 86 |
+
- **Custom architecture.** The HF inference widget is disabled; load and run the
|
| 87 |
+
model with the snippet below.
|
| 88 |
+
|
| 89 |
+
## How to use
|
| 90 |
+
|
| 91 |
+
```python
|
| 92 |
+
# Download gc_editor.pt + the GearCut tokenizer from this repo, then rebuild the
|
| 93 |
+
# SparseMind model with the same config stored in the checkpoint and load weights.
|
| 94 |
+
import torch, sentencepiece as spm
|
| 95 |
+
ckpt = torch.load("gc_editor.pt", map_location="cpu")
|
| 96 |
+
cfg = ckpt["config"] # the exact training config
|
| 97 |
+
# model = SparseMind(Config(**cfg)); model.load_state_dict(ckpt["model"]); model.eval()
|
| 98 |
+
sp = spm.SentencePieceProcessor(); sp.Load("gearcut_tok.model")
|
| 99 |
+
prompt = 'clips: c1=intro.mp4(0.0-8.0) | remove the first 3 seconds of the clip =>'
|
| 100 |
+
# ids = sp.EncodeAsIds(prompt) ; generate ; stop at EOS ; json.loads the output
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
## Citation
|
| 104 |
+
|
| 105 |
+
```bibtex
|
| 106 |
+
@misc{gearcut_editor,
|
| 107 |
+
title = {GearCut Editor: an instruction-to-operations model for lightweight video editing},
|
| 108 |
+
author = {AMEFORGE},
|
| 109 |
+
year = {2026},
|
| 110 |
+
note = {Built on the SparseMind architecture}
|
| 111 |
+
}
|
| 112 |
+
```
|