I pre-trained a 700m on 18B tokens optimized for Python and Wikitext | TheOneWhoWill/Shibai-700M-Base · Hugging Face

Reddit r/LocalLLaMA Models

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.

No content available
Original Article
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

Puro-2B: Poor Lab's Qwen2-1.5B Trained on RTX 5090 within $5090

Hugging Face Daily Papers

This paper presents an open-source pretraining recipe that trains 2B-parameter language models on consumer-grade RTX 5090 GPUs for under $7K, achieving performance near larger baselines and deriving cost scaling laws for model training.

4090 + 5060 Ti + 64GB RAM: 206 t/s on a 35B-A3B, and a 122B at 37 t/s

Reddit r/LocalLLaMA

A user shares benchmark results for running large language models (Qwen 27B-122B) on a dual-GPU setup with RTX 4090 and RTX 5060 Ti, achieving high token generation speeds (e.g., 206 t/s on 35B-A3B, 37-41 t/s on 122B). The post includes setup details and a link to a GitHub repo with scripts and raw data.

@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.

X AI KOLs Timeline

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.