repo_description: Implementation for MatMul-free LM.
repo_topics: large-language-model linear-transformer llm
code: import os
  os.environ["TOKENIZERS_PARALLELISM"] = "false"
  import mmfreelm
  from transformers import AutoModelForCausalLM, AutoTokenizer
  #Change here to our open-sourced model
  name = 'ridger/MMfreeLM-370M'
  tokenizer = AutoTokenizer.from_pretrained(name)
  model = AutoModelForCausalLM.from_pretrained(name).cuda().half()
  input_prompt = "In a shocking finding, scientist discovered a herd of unicorns living in a remote, "
  input_ids = tokenizer(input_prompt, return_tensors="pt").input_ids.cuda()
  outputs = model.generate(input_ids, max_length=64,  do_sample=True, top_p=0.4, temperature=0.6)
  print(tokenizer.batch_decode(outputs, skip_special_tokens=True)[0])