parrot-syrinx (Core ML)

parrot-syrinx is the dependency parser that ParrotFlow (source) runs on a dictation before it removes hesitations. For each Universal Dependencies word it predicts a part of speech, a head and a relation. It works in English, French and Spanish.

This repository holds the files the app downloads. They are not meant to be used without the app's Swift code, which does the steps outside the Core ML graph.

Files

File What it is Size
parrot-syrinx.mlpackage The first 12 blocks of mmBERT-small, run twice (grammar pass and syntax pass), with each pass's LoRA merged. It takes the embeddings and the attention mask at a fixed length of 256 and returns both passes' hidden states. Compute precision is float32. 121 MB
syrinx.safetensors The 256000 × 384 embedding table, the grammar heads, the feature fusion and the biaffine parser, all in float32. The relation names and the head layout are in its metadata. 395 MB
tokenizer.json The mmBERT-small tokenizer, unchanged. 17.5 MB

How it runs

  1. Each word is tokenized on its own. The input is <bos>, the subwords, then <eos>, and has at most 256 subwords. A longer input is not parsed and is never truncated.
  2. The app gathers the embedding rows and runs the Core ML model on CPU and GPU.
  3. Each word's subword states are averaged, then rounded through float16. The grammar heads give a part of speech and 8 morphological features. The syntax pass adds them through the fusion layer, and a biaffine scorer rates every head and relation.
  4. A Chu-Liu-Edmonds decoder picks the best tree with one root.

The app matches the PyTorch reference on 3312 of 3312 held-out trees.

Training data and license

The weights were fine-tuned from jhu-clsp/mmBERT-small (MIT). The training data was Universal Dependencies treebanks, including English EWT, GUM and ESL Spoken, French GSD, ParisStories and Rhapsodie, and Spanish AnCora. The weights were also trained on additional repair and keep sentences in English, French and Spanish. Most of these treebanks are licensed CC BY-SA 4.0, and some are CC BY 4.0. Because of that, these weights are released under CC BY-SA 4.0.

Downloads last month
20
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for znaat/parrot-syrinx-coreml

Quantized
(295)
this model