Model Specs Overview
- Number of parameters: 678.4M
- Hidden size: 1280
- Number of layers: 28
- Number of attention heads: 16 (KV: 4)
- Intermediate size: 4480
- Sequence length: 2048
- RoPE Theta: 10,000
- Vocab size: 32,000
Getting Started
To use this model, you can load it with the Hugging Face Transformers library. To load the model you can use the following code snippet:
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "TheOneWhoWill/Shibai-700M-Base"
processor = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, device_map="auto")
Then once the model is in memory you can start generating output with the following code snippet:
prompt = "Once upon a time"
inputs = processor(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=256,
do_sample=True,
temperature=0.3,
top_p=0.95,
top_k=50,
repetition_penalty=1.15,
no_repeat_ngram_size=3,
)
generated_text = processor.decode(outputs[0], skip_special_tokens=True)
print(generated_text)
Keep in mind that this model was pre-trained at a 2k context length and so you can't expect it to generate a stop token. This model works well for simple next-token prediction tasks but isn't fine tuned for instruction following or chat tasks. For those tasks I am planning on releasing a fine-tuned version of this model in the near future.