MariaFjodorowa commited on
Commit
3b7863c
·
verified ·
1 Parent(s): 9f6115d

Updating README with 2.0 in name

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -40,8 +40,8 @@ This model currently needs a custom wrapper from `modeling_ltgbert.py`, you shou
40
  import torch
41
  from transformers import AutoTokenizer, AutoModelForMaskedLM
42
 
43
- tokenizer = AutoTokenizer.from_pretrained("HPLT/hplt_bert_base_spa-Latn")
44
- model = AutoModelForMaskedLM.from_pretrained("HPLT/hplt_bert_base_spa-Latn", trust_remote_code=True)
45
 
46
  mask_id = tokenizer.convert_tokens_to_ids("[MASK]")
47
  input_text = tokenizer("It's a beautiful[MASK].", return_tensors="pt")
@@ -60,13 +60,13 @@ We are releasing 10 intermediate checkpoints for each model at intervals of ever
60
 
61
  You can load a specific model revision with `transformers` using the argument `revision`:
62
  ```python
63
- model = AutoModelForMaskedLM.from_pretrained("HPLT/hplt_bert_base_spa-Latn", revision="step21875", trust_remote_code=True)
64
  ```
65
 
66
  You can access all the revisions for the models with the following code:
67
  ```python
68
  from huggingface_hub import list_repo_refs
69
- out = list_repo_refs("HPLT/hplt_bert_base_spa-Latn")
70
  print([b.name for b in out.branches])
71
  ```
72
 
 
40
  import torch
41
  from transformers import AutoTokenizer, AutoModelForMaskedLM
42
 
43
+ tokenizer = AutoTokenizer.from_pretrained("HPLT/hplt_bert_base_2_0_spa-Latn")
44
+ model = AutoModelForMaskedLM.from_pretrained("HPLT/hplt_bert_base_2_0_spa-Latn", trust_remote_code=True)
45
 
46
  mask_id = tokenizer.convert_tokens_to_ids("[MASK]")
47
  input_text = tokenizer("It's a beautiful[MASK].", return_tensors="pt")
 
60
 
61
  You can load a specific model revision with `transformers` using the argument `revision`:
62
  ```python
63
+ model = AutoModelForMaskedLM.from_pretrained("HPLT/hplt_bert_base_2_0_spa-Latn", revision="step21875", trust_remote_code=True)
64
  ```
65
 
66
  You can access all the revisions for the models with the following code:
67
  ```python
68
  from huggingface_hub import list_repo_refs
69
+ out = list_repo_refs("HPLT/hplt_bert_base_2_0_spa-Latn")
70
  print([b.name for b in out.branches])
71
  ```
72