Back to all models
Model card Files and versions Use in transformers
fill-mask mask_token: <mask>
Query this model
πŸ”₯ This model is currently loaded and running on the Inference API. ⚠️ This model could not be loaded by the inference API. ⚠️ This model can be loaded on the Inference API on-demand.
JSON Output
API endpoint  

⚑️ Upgrade your account to access the Inference API

Share Copied link to clipboard

Contributed by

julien-c Julien Chaumond Pro
23 models

Dummy model used for unit testing and CI

import json
import os
from transformers import RobertaConfig, RobertaForMaskedLM, TFRobertaForMaskedLM

DIRNAME = "./dummy-unknown"

config = RobertaConfig(10, 20, 1, 1, 40)

model = RobertaForMaskedLM(config)

tf_model = TFRobertaForMaskedLM.from_pretrained(DIRNAME, from_pt=True)

# Tokenizer:

vocab = [
vocab_tokens = dict(zip(vocab, range(len(vocab))))
merges = ["#version: 0.2", "\u0120 l", "\u0120l o", "\u0120lo w", "e r", ""]

vocab_file = os.path.join(DIRNAME, "vocab.json")
merges_file = os.path.join(DIRNAME, "merges.txt")
with open(vocab_file, "w", encoding="utf-8") as fp:
    fp.write(json.dumps(vocab_tokens) + "\n")
with open(merges_file, "w", encoding="utf-8") as fp: