Downloads · 30 days
491
15% of all-time downloads
ahxt/llama1_s_1.8B_experimental
llama1_s_1.8B_experimental is a text generation model from ahxt. Use it when you need the model to write or continue text. It is set up for transformers.
In this series of repos, we present an open-source reproduction of Meta AI's LLaMA and LLaMa 2 large language models. However, with significantly reduced model sizes, the experimental version of llama1s has 1.8B param…
Downloads · 30 days
491
15% of all-time downloads
All-time downloads
3.2K
Public
Repo size
14.5 GB
Likes
4
Public
Click a slice to open those files.
.bin7.3 GB · 100%
From the Hugging Face model README
In this series of repos, we present an open-source reproduction of Meta AI's LLaMA and LLaMa 2 large language models. However, with significantly reduced model sizes, the experimental version of llama1_s has 1.8B parameters, and the experimental version of llama2_xs has 460M parameters. ('s' stands for small, while 'xs' denotes extra small).
We train our models on part of RedPajama dataset. We use the GPT2Tokenizer to tokenize the text.
The experimental checkpoints can be directly loaded by Transformers library. The following code snippet shows how to load the our experimental model and generate text with it.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
# model_path = 'ahxt/llama2_xs_460M_experimental'
model_path = 'ahxt/llama1_s_1.8B_experimental'
model = AutoModelForCausalLM.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path)
model.eval()
prompt = 'Q: What is the highest mountain?\nA:'
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
tokens = model.generate(input_ids, max_length=20)
print( tokenizer.decode(tokens[0].tolist(), skip_special_tokens=True) )
# Q: What is the largest bird?\nA: The largest bird is the bald eagle.
This experimental version is developed by: Xiaotian Han from Texas A&M University. And these experimental verisons are for research only.