tau / tavbert-ar

huggingface.co
Total runs: 5
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: April 09 2022
fill-mask

Introduction of tavbert-ar

Model Details of tavbert-ar

TavBERT base model

An Arabic BERT-style masked language model operating over characters, pre-trained by masking spans of characters, similarly to SpanBERT (Joshi et al., 2020).

How to use
import numpy as np
import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer

model = AutoModelForMaskedLM.from_pretrained("tau/tavbert-ar")
tokenizer = AutoTokenizer.from_pretrained("tau/tavbert-ar")

def mask_sentence(sent, span_len=5):
    start_pos = np.random.randint(0, len(sent) - span_len)
    masked_sent = sent[:start_pos] + '[MASK]' * span_len + sent[start_pos + span_len:]
    print("Masked sentence:", masked_sent)
    output = model(**tokenizer.encode_plus(masked_sent, 
                                           return_tensors='pt'))['logits'][0][1:-1]
    preds = [int(x) for x in torch.argmax(torch.softmax(output, axis=1), axis=1)[start_pos:start_pos + span_len]]
    pred_sent = sent[:start_pos] + ''.join(tokenizer.convert_ids_to_tokens(preds)) + sent[start_pos + span_len:]
    print("Model's prediction:", pred_sent)
Training data

OSCAR (Ortiz, 2019) Arabic section (32 GB text, 67 million sentences).

Runs of tau tavbert-ar on huggingface.co

5
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About tavbert-ar huggingface.co Model

tavbert-ar huggingface.co

tavbert-ar huggingface.co is an AI model on huggingface.co that provides tavbert-ar's model effect (), which can be used instantly with this tau tavbert-ar model. huggingface.co supports a free trial of the tavbert-ar model, and also provides paid use of the tavbert-ar. Support call tavbert-ar model through api, including Node.js, Python, http.

tavbert-ar huggingface.co Url

https://huggingface.co/tau/tavbert-ar

tau tavbert-ar online free

tavbert-ar huggingface.co is an online trial and call api platform, which integrates tavbert-ar's modeling effects, including api services, and provides a free online trial of tavbert-ar, you can try tavbert-ar online for free by clicking the link below.

tau tavbert-ar online free url in huggingface.co:

https://huggingface.co/tau/tavbert-ar

tavbert-ar install

tavbert-ar is an open source model from GitHub that offers a free installation service, and any user can find tavbert-ar on GitHub to install. At the same time, huggingface.co provides the effect of tavbert-ar install, users can directly use tavbert-ar installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

tavbert-ar install url in huggingface.co:

https://huggingface.co/tau/tavbert-ar

Url of tavbert-ar

tavbert-ar huggingface.co Url

Provider of tavbert-ar huggingface.co

tau
ORGANIZATIONS

Other API from tau

huggingface.co

Total runs: 28.8K
Run Growth: 27.0K
Growth Rate: 93.85%
Updated:August 17 2021
huggingface.co

Total runs: 733
Run Growth: 514
Growth Rate: 70.12%
Updated:August 10 2022
huggingface.co

Total runs: 60
Run Growth: 0
Growth Rate: 0.00%
Updated:February 09 2022
huggingface.co

Total runs: 17
Run Growth: 10
Growth Rate: 58.82%
Updated:August 17 2021
huggingface.co

Total runs: 6
Run Growth: -9
Growth Rate: -150.00%
Updated:August 10 2022
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:April 09 2022
huggingface.co

Total runs: 3
Run Growth: -1
Growth Rate: -33.33%
Updated:March 07 2022
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:March 14 2022
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 07 2022
huggingface.co

Total runs: 0
Run Growth: -7
Growth Rate: 0.00%
Updated:May 08 2022
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:October 21 2021