Text Generation
Transformers
Safetensors
t5
text2text-generation
diacritics
diacritization
accent-restoration
yoruba
igbo
hausa
vietnamese
byt5
text-generation-inference
Instructions to use olaverse/diacnet-1.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use olaverse/diacnet-1.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="olaverse/diacnet-1.1")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("olaverse/diacnet-1.1") model = AutoModelForSeq2SeqLM.from_pretrained("olaverse/diacnet-1.1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use olaverse/diacnet-1.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "olaverse/diacnet-1.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "olaverse/diacnet-1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/olaverse/diacnet-1.1
- SGLang
How to use olaverse/diacnet-1.1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "olaverse/diacnet-1.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "olaverse/diacnet-1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "olaverse/diacnet-1.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "olaverse/diacnet-1.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use olaverse/diacnet-1.1 with Docker Model Runner:
docker model run hf.co/olaverse/diacnet-1.1
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,7 +12,7 @@ language:
|
|
| 12 |
- fr
|
| 13 |
- it
|
| 14 |
library_name: transformers
|
| 15 |
-
pipeline_tag:
|
| 16 |
base_model: google/byt5-base
|
| 17 |
tags:
|
| 18 |
- diacritics
|
|
@@ -26,6 +26,13 @@ tags:
|
|
| 26 |
datasets:
|
| 27 |
- olaverse/diacnet-1.1-corpus
|
| 28 |
- olaverse/diacbench
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
metrics:
|
| 30 |
- cer
|
| 31 |
- wer
|
|
@@ -62,7 +69,7 @@ print(gen("<pol> Lodz jest piekna")) # Łódź jest piękna
|
|
| 62 |
|
| 63 |
Evaluated on [diacbench](https://huggingface.co/datasets/olaverse/diacbench) — 1,000 held-out sentences per language, sourced independently of the training corpus. Metrics: **DER** (diacritic error rate, errors restricted to diacritic-eligible characters), **WER**, **CER**, exact sentence match. All figures below use n=300 per language with greedy decoding.
|
| 64 |
|
| 65 |
-
, while v1.1 is perfect on 60% of sentences and worse on the rest.
|
| 100 |
|
|
@@ -134,7 +141,7 @@ Scored strictly, **diacnet-1.1 beats Claude on 8 of 10 languages**. With fallbac
|
|
| 134 |
| Claude 4.5 | 74.3% | 79.3% | 65.7% | 97.7% | 96.7% | 98.0% | 97.7% | 98.3% | 88.3% | 100% |
|
| 135 |
| GPT-4o-mini | 68.0% | 57.3% | 49.3% | 93.7% | 96.0% | 94.7% | 97.7% | 97.3% | 96.7% | 99.7% |
|
| 136 |
|
| 137 |
-
 — 1,000 held-out sentences per language, sourced independently of the training corpus. Metrics: **DER** (diacritic error rate, errors restricted to diacritic-eligible characters), **WER**, **CER**, exact sentence match. All figures below use n=300 per language with greedy decoding.
|
| 71 |
|
| 72 |
+

|
| 73 |
|
| 74 |
| lang | DER | WER | CER | exact | DER with `<auto>` |
|
| 75 |
|---|---:|---:|---:|---:|---:|
|
|
|
|
| 101 |
| hau | **0.0383** | 0.0593 | 8.58% | **2.53%** | mixed |
|
| 102 |
| yor | **0.1554** | 0.2006 | **27.69%** | 42.18% | 1.0 better |
|
| 103 |
|
| 104 |
+

|
| 105 |
|
| 106 |
Note that DER and WER disagree on ibo/hau/fra: v1.1 makes *fewer wrong words* but a higher share of diacritic-level errors within them. For Hausa the difference is stark — v1.0 got some detail wrong in almost every sentence (0% exact match), while v1.1 is perfect on 60% of sentences and worse on the rest.
|
| 107 |
|
|
|
|
| 141 |
| Claude 4.5 | 74.3% | 79.3% | 65.7% | 97.7% | 96.7% | 98.0% | 97.7% | 98.3% | 88.3% | 100% |
|
| 142 |
| GPT-4o-mini | 68.0% | 57.3% | 49.3% | 93.7% | 96.0% | 94.7% | 97.7% | 97.3% | 96.7% | 99.7% |
|
| 143 |
|
| 144 |
+

|
| 145 |
|
| 146 |
**WER**
|
| 147 |
|