PCS (Punctuation + Capitalization + Segmentation) โ€” GGUF

GGUF conversion of 1-800-BAD-CODE/xlm-roberta_punctuation_fullstop_truecase for use with CrispASR and CrisperWeaver.

Model

PCS performs three text post-processing tasks in a single pass:

  1. Punctuation restoration โ€” adds commas, periods, question marks, exclamation marks, colons, semicolons, dashes, and 10 other punctuation types
  2. Truecasing โ€” restores proper capitalization (per-character upper/lower classification)
  3. Sentence boundary detection โ€” identifies sentence breaks

Particularly useful for ASR backends that output unpunctuated lowercase text (wav2vec2, fastconformer-ctc, firered-asr, parakeet-ctc, omniasr-ctc).

Architecture

  • Encoder: XLM-RoBERTa-base (12 layers, d=768, 12 heads, SentencePiece tokenizer)
  • 4 classification heads:
    • post_punc: Linear(768 -> 256 -> 17) โ€” post-word punctuation (., ,, ?, !, :, ;, -, etc.)
    • pre_punc: Linear(768 -> 256 -> 2) โ€” pre-word punctuation (ยฟ, ยก)
    • sbd: Linear(772 -> 128 -> 2) โ€” sentence boundary detection
    • truecase: Linear(769 -> 128 -> 16) โ€” per-character upper/lower case

Languages

Supports 47 languages via XLM-RoBERTa's multilingual encoder. Quality is best on the 12 languages the classification heads were trained on (EN, DE, FR, ES, IT, PT, NL, PL, RU, UK, CS, DA) but generalizes to all 47 XLM-R languages.

Files

File Size SHA-256 Description
pcs-xlmr-base-q4_k-mixed.gguf 167 MB 341c26b8309a398a2ed597020876abe40a98236a09baab67b314797f657c2839 Default. Q4_K + imatrix with encoder layer 0 and the truecase head at Q8_0
pcs-xlmr-base-q4_k-imatrix.gguf 163 MB faee4bf8469a502362b5967a2cfeb7a1732539fbd999c63b489d00efff3531da Previous default (Q4_K + imatrix). Loses one casing decision (see below)
pcs-xlmr-base-q8_0.gguf 302 MB 5656dca3883fe391ddf53926cd4af89a1b5b474a5a50eb5884389fed737ca2db Q8_0, ground-truth parity
pcs-xlmr-base-iq4_xs.gguf 154 MB f2cab4c93c2ea9e6ac4464f6c33b6e967e26d6edeea159a545e8ba354a281473 IQ4_XS + imatrix
pcs-xlmr-base-q4_k.gguf 163 MB 226542897e246aa934689a603e24d3026e5f20b2654e1db57bcf1eb578ef2205 Q4_K, no imatrix
pcs-xlmr-base.gguf 947 MB 28057dd95378348dd72a374446bdd83d0fa30ab24ecb0e8d01ce44aa8f4459d7 Full precision source (F32 matrices)
pcs-xlmr-base.imatrix 0.3 MB 4c04cf422c12973320f4b7c27757ed5304d394333ed42e62024765407712acbc Importance matrix used by the imatrix files

Mixed-precision default (pcs-xlmr-base-q4_k-mixed.gguf)

The all-4-bit q4_k-imatrix file turns I'm OK into I'm oK: in exact arithmetic (the original ONNX graph running the file's dequantized weights) the truecase logit for the o of โ–ok is โˆ’0.238, against +1.083 with the original weights. No single tensor causes it; it is accumulated 4-bit rounding, mostly in encoder layer 0 and the truecase head (root cause).

The mixed file is the same recipe with those two groups at Q8_0:

crispembed-quantize pcs-xlmr-base.gguf pcs-xlmr-base-q4_k-mixed.gguf q4_k \
    --imatrix pcs-xlmr-base.imatrix \
    --tensor-type 'enc.0.*=q8_0' --tensor-type 'head.tc.*=q8_0'
file o logit (exact replay) four heads, 67 tokens decoded, 6 lines
original F32 weights +1.083 โ€” โ€”
q8_0 +0.992 67/67 6/6
q4_k-mixed +0.688 67/67 6/6
q4_k-imatrix โˆ’0.238 66/67 on AVX2 5/6 on AVX2

The other candidates measured: encoder layer 0 alone +0.403, truecase head alone +0.121, adding layer 3 +0.952 (170 MB), adding layers 2โ€“3 +1.135 (174 MB). Layer 0 plus the head is the smallest set that keeps the decision with margin. Size is +3.5 MB (+2.2 %) over q4_k-imatrix.

Usage

CrispASR CLI

# Apply PCS to unpunctuated text
crispasr --punc-model pcs \
  -f audio.wav \
  --backend parakeet

# Standalone text processing
echo "hello how are you doing today i am fine" | \
  crispasr-pcs pcs-xlmr-base-q4_k-mixed.gguf
# Output: "Hello, how are you doing today? I am fine."

CrisperWeaver (Flutter GUI)

Download from Model Management (Post-processors section). Enable "Restore punctuation" in Advanced Options โ€” PCS runs automatically as a post-processing step after transcription.

C API

#include "crispasr.h"

void* pcs = crispasr_pcs_init("pcs-xlmr-base-q4_k-mixed.gguf");
const char* result = crispasr_pcs_process(pcs, "hello how are you");
// result: "Hello, how are you?"
crispasr_pcs_free_text(result);
crispasr_pcs_free(pcs);

Dart FFI

final pcs = crispasr.PcsModel.open('pcs-xlmr-base-q4_k-mixed.gguf');
final text = pcs.process('hello how are you doing today');
print(text); // "Hello, how are you doing today?"
pcs.close();

Comparison with other post-processors

Model Languages Punct Truecase SBD Size (Q4_K)
PCS 47 17 types per-char yes 167 MB
FireRedPunc ZH + EN yes yes no ~100 MB
Fullstop-punc EN/DE/FR/IT yes yes no ~300 MB
Truecaser LSTM DE/EN/ES/RU no yes no ~3 MB

PCS is the most comprehensive option โ€” it handles all three tasks in one pass across the widest language set.

License

Apache-2.0, the licence of the upstream model 1-800-BAD-CODE/xlm-roberta_punctuation_fullstop_truecase. These GGUF files are format conversions and quantizations of its weights; the upstream licence and notices apply. (Earlier revisions of this card said MIT; that was wrong.)

Links

Downloads last month
1,463
GGUF
Model size
0.3B params
Architecture
pcs
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for cstr/pcs-xlmr-base-GGUF