Run this model with HF Jobs

Run khwstolle/prose-format-bert-mini on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/khwstolle/prose-format-bert-mini. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/khwstolle/prose-format-bert-mini on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
khwstolle's picture
Upload folder using huggingface_hub
b4230b7 verified
|
Raw History Blame
1.24 kB
---
language:
- en
license: mit
tags:
- token-classification
- prose-format
- prose-formatting
- pytorch
- transformers
pipeline_tag: token-classification
---
# 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`:
```python
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)
```