Model reference · open weights
dictabert-parse is an open-weight embedding model from dicta-il. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | dicta-il |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Parameters (lead) | 186M |
| Context | 512 tokens |
| Runs with | transformers |
| Released | 2024-02-15 |
| Popularity | 1k downloads / month |
| Licence | Open weights |
About
State-of-the-art language model for parsing Hebrew, released here.
This is the fine-tuned model for the joint parsing of the following tasks:
This model was initialized from dictabert-joint and tuned on the Hebrew UD Treebank and NEMO corpora, to align the predictions of the model to the tagging methodology in those corpora.
A live demo of the dictabert-joint model with instant visualization of the syntax tree can be found here.
For a faster model, you can use the equivalent bert-tiny model for this task here.
For the bert-base models for other tasks, see here.
For our most accurate model, built upon BERT-Large, see here.
The model currently supports 3 types of output:
JSON: The model returns a JSON object for each sentence in the input, where for each sentence we have the sentence text, the NER entities, and the list of tokens. For each token we include the output from each of the tasks.
model.predict(..., output_style='json')
UD: The model returns the full UD output for each sentence, according to the style of the Hebrew UD Treebank.
model.predict(..., output_style='ud')
UD, in the style of IAHLT: This model returns the full UD output, with slight modifications to match the style of IAHLT. This differences are mostly granularity of some dependency relations, how the suffix of a word is broken up, and implicit definite articles. The actual tagging behavior doesn't change.
model.predict(..., output_style='iahlt_ud')
If you only need the output for one of the tasks, you can tell the model to not initialize some of the heads, for example:
model = AutoModel.from_pretrained('dicta-il/dictabert-parse', trust_remote_code=True, do_lex=False)
The list of options are: do_lex, do_syntax, do_ner, do_prefix, do_morph.
Sample usage:
from transformers import AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('dicta-il/dictabert-parse')
model = AutoModel.from_pretrained('dicta-il/dictabert-parse', trust_remote_code=True)
model.eval()
sentence = 'בשנת 1948 השלים אפרים קישון את לימודיו בפיסול מתכת ובתולדות האמנות והחל לפרסם מאמרים הומוריסטיים'
print(model.predict([sentence], tokenizer, output_style='json')) # see below for other return formats
Output:
[
{
"text": "בשנת 1948 השלים אפרים קישון את לימודיו בפיסול מתכת ובתולדות האמנות והחל לפרסם מאמרים הומוריסטיים",
"tokens": [
{
"token": "בשנת",
"offsets": {
"start": 0,
"end": 4
},
"syntax": {
"word": "בשנת",
"dep_head_idx": 2,
"dep_func": "obl",
"dep_head": "השלים"
},
"seg": [
"ב",
"שנת"
],
"lex": "שנה",
"morph": {
"token": "בשנת",
"pos": "NOUN",
"feats": {
"Gender": "Fem",
"Number": "Sing"
},
"prefixes": [
"ADP"
],
"suffix": false
}
},
{
"token": "1948",
"offsets": {
"start": 5,
"end": 9
},
"syntax": {
"word": "1948",
"dep_head_idx": 0,
"dep_func": "compound:smixut",
"dep_head": "בשנת"
},
"seg": [
"1948"
],
"lex": "1948",
"morph": {
"token": "1948",
"pos": "NUM",
"feats": {},
"prefixes": [],
"suffix": false
}
},
{
"token": "השלים",
"offsets": {
"start": 10,
"end": 15
},
"syntax": {
"word": "השלים",
"dep_head_idx": -1,
"dep_func": "root",
"dep_head": "הומוריסטיים"
},
"seg": [
"השלים"
],
"lex": "השלים",
"morph": {
"token": "השלים",
"pos": "VERB",
"feats": {
"Gender": "Masc",
"Number": "Sing",
"Person": "3",
"Tense": "Past"
},
"prefixes": [],
"suffix": false
}
},
{
"token": "אפרים",
"offsets": {
"start": 16,
"end": 21
},
"syntax": {
"word": "אפרים",
"dep_head_idx": 2,
"dep_func": "nsubj",
"dep_head": "השלים"
},
"seg": [
"אפרים"
],
"lex": "אפרים",
"morph": {
"token": "אפרים",
"pos": "PROPN",
"feats": {},
"prefixes": [],
"suffix": false
}
},
{
"token": "קישון",
"offsets": {
"start": 22,
"end": 27
},
"syntax": {
"word": "קישון",
"dep_head_idx": 3,
"dep_func": "flat:name",
"dep_head": "אפרים"
},
"seg": [
"קישון"
],
"lex": "קישון",
"morph": {
"token": "קישון",
"pos": "PROPN",
"feats": {},
"prefixes": [],
"suffix": false
}
},
{
"token": "את",
"offsets": {
"start": 28,
"end": 30
},
"syntax": {
"word": "את",
"dep_head_idx": 6,
"dep_func": "case:acc",
"dep_head": "לימודיו"
},
"seg": [
"את"
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys dictabert-parse for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (dictabert-parse below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"dictabert-parse","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.