ryo0634 commited on
Commit
d3e1943
1 Parent(s): 808a8e8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -9
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- license: apache-2.0
3
  datasets:
4
  - wikipedia
5
  language:
@@ -15,15 +15,13 @@ Trained on English and Japanese Wikipedia data.
15
 
16
  ## How to use
17
 
18
- ```
19
- import torch
20
- from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline, set_seed
21
 
22
- model = AutoModelForCausalLM.from_pretrained("sbintuitions/tiny_lm")
23
- tokenizer = AutoTokenizer.from_pretrained("sbintuitions/tiny_lm", use_fast=False)
24
  generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
25
-
26
- print(generator("Hello", max_length=30, do_sample=True, top_k=1000))
27
  ```
28
 
29
  ## Model architecture
@@ -33,4 +31,5 @@ A 4-layer, 512-hidden-size transformer-based language model.
33
  The model was trained on English Wikipedia and Japanese Wikipedia to optimize a traditional language modelling objective for 25B tokens.
34
 
35
  ## License
36
- [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
 
 
1
  ---
2
+ license: mit
3
  datasets:
4
  - wikipedia
5
  language:
 
15
 
16
  ## How to use
17
 
18
+ ```python
19
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
20
 
21
+ model = AutoModelForCausalLM.from_pretrained("sbintuitions/tiny-lm", torch_dtype="auto")
22
+ tokenizer = AutoTokenizer.from_pretrained("sbintuitions/tiny-lm")
23
  generator = pipeline("text-generation", model=model, tokenizer=tokenizer)
24
+ print(generator("Hello", max_length=30, do_sample=True, top_k=100))
 
25
  ```
26
 
27
  ## Model architecture
 
31
  The model was trained on English Wikipedia and Japanese Wikipedia to optimize a traditional language modelling objective for 25B tokens.
32
 
33
  ## License
34
+ [MIT License](https://huggingface.co/sbintuitions/tiny-lm/resolve/main/LICENSE)
35
+