Instructions to use zouhar/COMET-partial with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- COMET
How to use zouhar/COMET-partial with COMET:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Vilém Zouhar commited on
Update example to English->German
Browse files
README.md
CHANGED
|
@@ -119,19 +119,24 @@ pip3 install -e comet_early_exit
|
|
| 119 |
This model is described in the appendix in the paper.
|
| 120 |
It is able to score even *incomplete* translations (i.e. prefixes of translations):
|
| 121 |
```python
|
|
|
|
| 122 |
model = comet_early_exit.load_from_checkpoint(comet_early_exit.download_model("zouharvi/COMET-partial"))
|
| 123 |
data = [
|
| 124 |
{
|
| 125 |
-
"src": "
|
| 126 |
-
"mt": "
|
| 127 |
},
|
| 128 |
{
|
| 129 |
-
"src": "
|
| 130 |
-
"mt": "
|
| 131 |
},
|
| 132 |
{
|
| 133 |
-
"src": "
|
| 134 |
-
"mt": "
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
}
|
| 136 |
]
|
| 137 |
model_output = model.predict(data, batch_size=8, gpus=1)
|
|
@@ -139,7 +144,7 @@ print("scores", model_output["scores"])
|
|
| 139 |
```
|
| 140 |
Outputs (formatted):
|
| 141 |
```
|
| 142 |
-
scores 89.
|
| 143 |
```
|
| 144 |
|
| 145 |
This model is based on the work [Early-Exit and Instant Confidence Translation Quality Estimation](http://arxiv.org/abs/2502.14429) which can be cited as:
|
|
|
|
| 119 |
This model is described in the appendix in the paper.
|
| 120 |
It is able to score even *incomplete* translations (i.e. prefixes of translations):
|
| 121 |
```python
|
| 122 |
+
import comet_early_exit
|
| 123 |
model = comet_early_exit.load_from_checkpoint(comet_early_exit.download_model("zouharvi/COMET-partial"))
|
| 124 |
data = [
|
| 125 |
{
|
| 126 |
+
"src": "Will I receive my food in 10 to 15 minutes?",
|
| 127 |
+
"mt": "Ich bekomme",
|
| 128 |
},
|
| 129 |
{
|
| 130 |
+
"src": "Will I receive my food in 10 to 15 minutes?",
|
| 131 |
+
"mt": "Bekomme ich",
|
| 132 |
},
|
| 133 |
{
|
| 134 |
+
"src": "Will I receive my food in 10 to 15 minutes?",
|
| 135 |
+
"mt": "Bekomme ich mein Essen in",
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"src": "Will I receive my food in 10 to 15 minutes?",
|
| 139 |
+
"mt": "Bekomme ich mein Essen in 10 bis 15 Minuten?",
|
| 140 |
}
|
| 141 |
]
|
| 142 |
model_output = model.predict(data, batch_size=8, gpus=1)
|
|
|
|
| 144 |
```
|
| 145 |
Outputs (formatted):
|
| 146 |
```
|
| 147 |
+
scores 89.58 88.99 89.94 89.94
|
| 148 |
```
|
| 149 |
|
| 150 |
This model is based on the work [Early-Exit and Instant Confidence Translation Quality Estimation](http://arxiv.org/abs/2502.14429) which can be cited as:
|