ArthurZ HF staff commited on
Commit
c270eb1
1 Parent(s): 2da39d0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -6,12 +6,12 @@ tags: []
6
  from transformers import MambaConfig, MambaForCausalLM, AutoTokenizer
7
  import torch
8
 
9
- tokenizer = AutoTokenizer.from_pretrained("ArthurZ/mamba-130m")
10
  tokenizer.pad_token = tokenizer.eos_token
11
 
12
- model = MambaForCausalLM.from_pretrained("ArthurZ/mamba-130m", vocab_size=50280, num_hidden_layers=24, torch_dtype=torch.float32)
13
  model.config.use_cache = True
14
- input_ids = tokenizer("Hey how are you doing?", return_tensors= "pt")["input_ids"]
15
 
16
  out = model.generate(input_ids, max_new_tokens=10)
17
  print(tokenizer.batch_decode(out))
 
6
  from transformers import MambaConfig, MambaForCausalLM, AutoTokenizer
7
  import torch
8
 
9
+ tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neox-20b", padding_side = "left")
10
  tokenizer.pad_token = tokenizer.eos_token
11
 
12
+ model = MambaForCausalLM.from_pretrained("state-spaces/mamba-130m", vocab_size=50280, num_hidden_layers=24, torch_dtype=torch.float32)
13
  model.config.use_cache = True
14
+ input_ids = tokenizer(["Hey how are you doing?", "Explain how soy sauce is made"], padding=True, return_tensors= "pt")["input_ids"]
15
 
16
  out = model.generate(input_ids, max_new_tokens=10)
17
  print(tokenizer.batch_decode(out))