khwstolle/prose-format-bert-mini

This model predicts token-level line-break and indentation boundaries for formatting prose and documentation with prose-format.

Architecture Details

  • Base Architecture: BertForTokenClassification
  • Hidden Dimensions: 256
  • Hidden Layers: 4
  • Attention Heads: 4
  • Maximum Sequence Length: 512 tokens
  • Output Classes: 9 line-break boundary classes

Direct Inference with Transformers

This repository contains standard Hugging Face configuration and model weights, allowing standard loading via transformers:

import torch
from transformers import AutoModelForTokenClassification, AutoTokenizer

model_id = "khwstolle/prose-format-bert-mini"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id)
model.eval()

text = "Clear line breaks improve version control diff readability."
inputs = tokenizer(text, return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits
    predictions = logits.argmax(dim=-1)
Downloads last month
33
Safetensors
Model size
11.1M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support