stas commited on
Commit
608ea72
1 Parent(s): 6bbc16b
Files changed (3) hide show
  1. README.md +1 -0
  2. make-tiny-xlm-roberta.py +5 -1
  3. pytorch_model.bin +1 -1
README.md ADDED
@@ -0,0 +1 @@
 
 
1
+ This is a tiny random {mname_tiny} model to be used for basic testing
make-tiny-xlm-roberta.py CHANGED
@@ -122,7 +122,6 @@ model_tiny = XLMRobertaForCausalLM(config_tiny)
122
  print(f"{mname_tiny}: num of params {model_tiny.num_parameters()}")
123
  model_tiny.resize_token_embeddings(len(tokenizer_tiny))
124
 
125
-
126
  inputs = tokenizer_tiny("hello", return_tensors="pt")
127
  outputs = model_tiny(**inputs)
128
  print("Test with normal tokenizer:", len(outputs.logits[0]))
@@ -137,4 +136,9 @@ model_tiny.save_pretrained(".")
137
  tokenizer_tiny.save_pretrained(".")
138
  tokenizer_fast_tiny.save_pretrained(".")
139
 
 
 
 
 
 
140
  print(f"Generated {mname_tiny}")
 
122
  print(f"{mname_tiny}: num of params {model_tiny.num_parameters()}")
123
  model_tiny.resize_token_embeddings(len(tokenizer_tiny))
124
 
 
125
  inputs = tokenizer_tiny("hello", return_tensors="pt")
126
  outputs = model_tiny(**inputs)
127
  print("Test with normal tokenizer:", len(outputs.logits[0]))
 
136
  tokenizer_tiny.save_pretrained(".")
137
  tokenizer_fast_tiny.save_pretrained(".")
138
 
139
+ readme = "README.md"
140
+ if not os.path.exists(readme):
141
+ with open(readme, "w") as f:
142
+ f.write(f"This is a tiny random {mname_tiny} model to be used for basic testing.")
143
+
144
  print(f"Generated {mname_tiny}")
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f27b39bb93be6fc20581fd2cce5f6db55ee7770c428ebac0df7f01d9e7aac311
3
  size 4334436
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b9c6cf79904c41a0ee0dd56366d40b9d2762235495edc6d04693ca3f41c50052
3
  size 4334436