Transformers
Back to all models
Model: julien-c/dummy-unknown

Monthly model downloads

julien-c/dummy-unknown julien-c/dummy-unknown
- downloads
last 30 days

pytorch

tf

Contributed by

julien-c Julien Chaumond company
No model yet

How to use this model directly from the 🤗/transformers library:

			
Copy model
tokenizer = AutoTokenizer.from_pretrained("julien-c/dummy-unknown") model = AutoModel.from_pretrained("julien-c/dummy-unknown")
import json
import os
from transformers.configuration_roberta import RobertaConfig
from transformers import RobertaForMaskedLM, TFRobertaForMaskedLM

DIRNAME = "./dummy-unknown"


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

model = RobertaForMaskedLM(config)
model.save_pretrained(DIRNAME)

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

# Tokenizer:

vocab = [
    "l",
    "o",
    "w",
    "e",
    "r",
    "s",
    "t",
    "i",
    "d",
    "n",
    "\u0120",
    "\u0120l",
    "\u0120n",
    "\u0120lo",
    "\u0120low",
    "er",
    "\u0120lowest",
    "\u0120newer",
    "\u0120wider",
    "<unk>",
]
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:
    fp.write("\n".join(merges))

Config

See raw config file
attention_probs_dropout_prob: 0.1 ...
bos_token_id: 0 ...
do_sample: false ...
eos_token_ids: 0 ...
▾ finetuning_task: null ...
hidden_act: "gelu" ...
hidden_dropout_prob: 0.1 ...
hidden_size: 20 ...
initializer_range: 0.02 ...
intermediate_size: 40 ...
is_decoder: false ...
layer_norm_eps: 1e-12 ...
length_penalty: 1 ...
max_length: 20 ...
max_position_embeddings: 512 ...
model_type: "roberta" ...
num_attention_heads: 1 ...
num_beams: 1 ...
num_hidden_layers: 1 ...
num_labels: 2 ...
num_return_sequences: 1 ...
output_attentions: false ...
output_hidden_states: false ...
output_past: true ...
pad_token_id: 0 ...
repetition_penalty: 1 ...
temperature: 1 ...
top_k: 50 ...
top_p: 1 ...
type_vocab_size: 2 ...
use_bfloat16: false ...
vocab_size: 10 ...