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

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -8
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- license: mit
3
  datasets:
4
  - wikipedia
5
  language:
@@ -15,13 +15,15 @@ Trained on English and Japanese Wikipedia data.
15
 
16
  ## How to use
17
 
18
- ```python
19
- from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
 
20
 
21
- model = AutoModelForCausalLM.from_pretrained("sbintuiotions/tiny-lm", torch_dtype="auto")
22
- tokenizer = AutoTokenizer.from_pretrained("sbintuiotions/tiny-lm", use_fast=False)
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,5 +33,4 @@ A 4-layer, 512-hidden-size transformer-based language model.
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
-
 
1
  ---
2
+ license: apache-2.0
3
  datasets:
4
  - wikipedia
5
  language:
 
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
  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)