Text Generation
Transformers
ONNX
Safetensors
mt5
text2text-generation
fact-decomposition
propositionizer
multilingual
Instructions to use liliplanet/propositionizer-mt5-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use liliplanet/propositionizer-mt5-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="liliplanet/propositionizer-mt5-small")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("liliplanet/propositionizer-mt5-small") model = AutoModelForSeq2SeqLM.from_pretrained("liliplanet/propositionizer-mt5-small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use liliplanet/propositionizer-mt5-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "liliplanet/propositionizer-mt5-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liliplanet/propositionizer-mt5-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/liliplanet/propositionizer-mt5-small
- SGLang
How to use liliplanet/propositionizer-mt5-small 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 "liliplanet/propositionizer-mt5-small" \ --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": "liliplanet/propositionizer-mt5-small", "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 "liliplanet/propositionizer-mt5-small" \ --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": "liliplanet/propositionizer-mt5-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use liliplanet/propositionizer-mt5-small with Docker Model Runner:
docker model run hf.co/liliplanet/propositionizer-mt5-small
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -22,7 +22,7 @@ datasets:
|
|
| 22 |
- klue
|
| 23 |
---
|
| 24 |
|
| 25 |
-
# Propositionizer-mT5-Small (Multilingual)
|
| 26 |
|
| 27 |
A multilingual atomic fact decomposition model that converts unstructured text into a list of self-contained atomic propositions.
|
| 28 |
|
|
@@ -33,7 +33,7 @@ A multilingual atomic fact decomposition model that converts unstructured text i
|
|
| 33 |
| Base Model | [google/mt5-small](https://huggingface.co/google/mt5-small) (300M params) |
|
| 34 |
| Training Method | Claude โ mT5-small distillation |
|
| 35 |
| Languages | English, Korean, Japanese, Chinese |
|
| 36 |
-
| Training Data | ~9,700 examples |
|
| 37 |
| Format | ONNX (int8 quantized) |
|
| 38 |
| License | Apache 2.0 |
|
| 39 |
|
|
@@ -53,7 +53,7 @@ const decomposer = await pipeline(
|
|
| 53 |
|
| 54 |
const result = await decomposer(
|
| 55 |
'Title: Meeting. Section: . Content: The deadline is Friday and the rate was reduced.',
|
| 56 |
-
{ max_new_tokens: 256 }
|
| 57 |
);
|
| 58 |
console.log(JSON.parse(result[0].generated_text));
|
| 59 |
// ["The deadline is Friday.", "The rate was reduced."]
|
|
@@ -69,7 +69,7 @@ model = AutoModelForSeq2SeqLM.from_pretrained("liliplanet/propositionizer-mt5-sm
|
|
| 69 |
|
| 70 |
input_text = "Title: ํ์. Section: . Content: ๊น ๋๋ฆฌ๊ฐ ์๊ธ์ ๋ฎ์ถ๊ณ ๋ง๊ฐ์ ๊ธ์์ผ์ด๋ค."
|
| 71 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 72 |
-
outputs = model.generate(**inputs,
|
| 73 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 74 |
```
|
| 75 |
|
|
@@ -83,25 +83,23 @@ Title: {title}. Section: {section}. Content: {content}
|
|
| 83 |
|
| 84 |
## Training
|
| 85 |
|
|
|
|
| 86 |
- **Source texts**: CNN/DailyMail, XSum, Wikipedia (EN/KO/JA/ZH), KLUE, XLSum
|
| 87 |
-
- **Labeling**: Claude
|
| 88 |
-
- **Data
|
| 89 |
-
- **Training**: 5 epochs, Adafactor
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
| **Overall** | **0.350** | **0.238** |
|
| 103 |
-
|
| 104 |
-
Note: String-matching metrics understate actual quality. The model produces semantically correct decompositions that differ in surface form from references.
|
| 105 |
|
| 106 |
## Comparison with Original Propositionizer
|
| 107 |
|
|
@@ -112,12 +110,12 @@ Note: String-matching metrics understate actual quality. The model produces sema
|
|
| 112 |
| Teacher | GPT-4 | Claude |
|
| 113 |
| Training Data | English only | Multilingual |
|
| 114 |
|
| 115 |
-
## Limitations
|
| 116 |
|
| 117 |
- Small model (300M) has limited capacity for complex decompositions
|
| 118 |
-
-
|
| 119 |
-
- May hallucinate facts not present in the source text
|
| 120 |
- Best suited for short-to-medium length paragraphs (< 500 chars)
|
|
|
|
| 121 |
|
| 122 |
## Citation
|
| 123 |
|
|
@@ -132,4 +130,4 @@ Note: String-matching metrics understate actual quality. The model produces sema
|
|
| 132 |
|
| 133 |
## Part of MemRosetta
|
| 134 |
|
| 135 |
-
This model is a component of the [MemRosetta](https://github.com/memrosetta) project for multilingual memory and knowledge extraction.
|
|
|
|
| 22 |
- klue
|
| 23 |
---
|
| 24 |
|
| 25 |
+
# Propositionizer-mT5-Small v2 (Multilingual)
|
| 26 |
|
| 27 |
A multilingual atomic fact decomposition model that converts unstructured text into a list of self-contained atomic propositions.
|
| 28 |
|
|
|
|
| 33 |
| Base Model | [google/mt5-small](https://huggingface.co/google/mt5-small) (300M params) |
|
| 34 |
| Training Method | Claude โ mT5-small distillation |
|
| 35 |
| Languages | English, Korean, Japanese, Chinese |
|
| 36 |
+
| Training Data | v1: ~9,700 + v2: ~5,900 Korean examples |
|
| 37 |
| Format | ONNX (int8 quantized) |
|
| 38 |
| License | Apache 2.0 |
|
| 39 |
|
|
|
|
| 53 |
|
| 54 |
const result = await decomposer(
|
| 55 |
'Title: Meeting. Section: . Content: The deadline is Friday and the rate was reduced.',
|
| 56 |
+
{ max_new_tokens: 256, repetition_penalty: 2.0 }
|
| 57 |
);
|
| 58 |
console.log(JSON.parse(result[0].generated_text));
|
| 59 |
// ["The deadline is Friday.", "The rate was reduced."]
|
|
|
|
| 69 |
|
| 70 |
input_text = "Title: ํ์. Section: . Content: ๊น ๋๋ฆฌ๊ฐ ์๊ธ์ ๋ฎ์ถ๊ณ ๋ง๊ฐ์ ๊ธ์์ผ์ด๋ค."
|
| 71 |
inputs = tokenizer(input_text, return_tensors="pt")
|
| 72 |
+
outputs = model.generate(**inputs, max_new_tokens=256, repetition_penalty=2.0, no_repeat_ngram_size=3, num_beams=4)
|
| 73 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 74 |
```
|
| 75 |
|
|
|
|
| 83 |
|
| 84 |
## Training
|
| 85 |
|
| 86 |
+
### v1
|
| 87 |
- **Source texts**: CNN/DailyMail, XSum, Wikipedia (EN/KO/JA/ZH), KLUE, XLSum
|
| 88 |
+
- **Labeling**: Claude Haiku 4.5 atomic fact decomposition
|
| 89 |
+
- **Data**: EN 4,879 / KO 2,860 / JA 983 / ZH 975 (~9,700 total)
|
| 90 |
+
- **Training**: 5 epochs, Adafactor, lr=1e-3, batch_size=16
|
| 91 |
+
|
| 92 |
+
### v2 (current)
|
| 93 |
+
- **Focus**: Korean quality improvement
|
| 94 |
+
- **Additional data**: ~5,900 Korean complex sentences (XLSum KO, KLUE NLI/RE/STS, KorQuAD, NSMC)
|
| 95 |
+
- **Improved prompt**: language drift prevention, proper noun preservation
|
| 96 |
+
- **Training**: continued training from v1, 3 epochs, lr=5e-4
|
| 97 |
+
- **Generation config**: repetition_penalty=2.0, no_repeat_ngram_size=3
|
| 98 |
+
|
| 99 |
+
### v2 improvements over v1
|
| 100 |
+
- Korean language drift (ํ๊ตญ์ดโ์์ด ์ ํ) resolved
|
| 101 |
+
- Repetition loop eliminated
|
| 102 |
+
- Proper noun preservation improved (CEO, Q2 ๋ฑ)
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
## Comparison with Original Propositionizer
|
| 105 |
|
|
|
|
| 110 |
| Teacher | GPT-4 | Claude |
|
| 111 |
| Training Data | English only | Multilingual |
|
| 112 |
|
| 113 |
+
## Known Limitations
|
| 114 |
|
| 115 |
- Small model (300M) has limited capacity for complex decompositions
|
| 116 |
+
- May hallucinate facts not present in the source text, especially with uncommon proper nouns
|
|
|
|
| 117 |
- Best suited for short-to-medium length paragraphs (< 500 chars)
|
| 118 |
+
- Korean complex sentences with many IT terms may produce errors
|
| 119 |
|
| 120 |
## Citation
|
| 121 |
|
|
|
|
| 130 |
|
| 131 |
## Part of MemRosetta
|
| 132 |
|
| 133 |
+
This model is a component of the [MemRosetta](https://github.com/obst2580/memrosetta) project for multilingual memory and knowledge extraction.
|