I pre-trained a 700m on 18B tokens optimized for Python and Wikitext | TheOneWhoWill/Shibai-700M-Base · Hugging Face
Summary
Shibai-700M-Base is a 700M parameter LLaMA-based model pre-trained on 18B tokens of English, math, and Python code, achieving coherent generation despite being under-trained compared to larger models, and notable for its efficient training on a single RTX 5070 Ti GPU.
View Cached Full Text
Cached at: 07/29/26, 08:11 PM
TheOneWhoWill/Shibai-700M-Base · Hugging Face
Source: https://huggingface.co/TheOneWhoWill/Shibai-700M-Base
https://huggingface.co/TheOneWhoWill/Shibai-700M-Base#shibai-700m-baseShibai 700m Base
This is a 700m parameter LLaMA based model pre-trained with over 18 billion tokens of English text, Math, and Python code at a 2k native context length. It was trained in two stages, first to establish a strong foundational model that can comprehend and generate text, and then to improve its reasoning and coding capabilities with a continued pre-training stage. The use of RoPE scaling allows the model to extrapolate to longer context lengths with the same quality, up to 8k tokens, without any additional training. Although this model may be considered under-trained compared to models such as Qwen 3 0.6B or Qwen 3.5 0.8B, it is still capable of generating coherent and contextually relevant text across a wide range of topics. It should also be noted that this model was trained for 400 hours exclusively on a single RTX 5070 Ti GPU, which is a significant achievement in terms of resource efficiency.
https://huggingface.co/TheOneWhoWill/Shibai-700M-Base#model-specs-overviewModel 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
https://huggingface.co/TheOneWhoWill/Shibai-700M-Base#getting-startedGetting 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.
Similar Articles
@vintcessun: Pretraining can be this cost-effective? Train a usable 1B base model from scratch for ~$1000, slashing compute and data by hundreds of times. The key isn't brute-force compute, but hierarchical recursive architecture plus latent space reasoning, combined with PrefixLM packing and FA3 to maximize efficiency. Sounds insane, but the paper and code are open-sourced.
HRM-Text released a 1B-parameter base model, claiming it can be pretrained from scratch for only ~$1000, reducing compute and data volume by hundreds of times. It employs efficient techniques such as hierarchical recursive architecture, latent space reasoning, and PrefixLM packing. The paper and code are open-sourced.
I trained a 75M parameter LLM from scratch on 18B tokens and it beats a model almost double its size
Trained a 75M parameter LLM called KeyLM from scratch on 18B tokens, achieving competitive instruction-following scores against larger models while using fewer parameters and less data.
@LottoLabs: A very cool model for the GPU poor bros Trained on an ungodly amount of tokens for a 8b a1b model Gonna be super fast e…
LottoLabs announces LiquidAI's LFM2.5-8B-A1B-GGUF model, an 8B parameter model trained on a massive token count and optimized for fast inference on limited GPU hardware, with support for llama.cpp, Ollama, vLLM, and more.
I pretrained and post trained a 500M parameter LLM and 330M parameter Image generator from scratch
The author details the process of pretraining and post-training a 500M parameter language model and a 330M parameter image generator entirely from scratch.
I trained a 0.5M model on 1B tokens of Fineweb-edu dataset.
A personal project where a 0.5M parameter language model was trained on 1 billion tokens from the Fineweb-edu dataset.