Instructions to use namanadep/foundational-llama-scratch-epic-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use namanadep/foundational-llama-scratch-epic-model with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf namanadep/foundational-llama-scratch-epic-model # Run inference directly in the terminal: llama cli -hf namanadep/foundational-llama-scratch-epic-model
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf namanadep/foundational-llama-scratch-epic-model # Run inference directly in the terminal: llama cli -hf namanadep/foundational-llama-scratch-epic-model
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf namanadep/foundational-llama-scratch-epic-model # Run inference directly in the terminal: ./llama-cli -hf namanadep/foundational-llama-scratch-epic-model
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf namanadep/foundational-llama-scratch-epic-model # Run inference directly in the terminal: ./build/bin/llama-cli -hf namanadep/foundational-llama-scratch-epic-model
Use Docker
docker model run hf.co/namanadep/foundational-llama-scratch-epic-model
- LM Studio
- Jan
- vLLM
How to use namanadep/foundational-llama-scratch-epic-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "namanadep/foundational-llama-scratch-epic-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "namanadep/foundational-llama-scratch-epic-model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/namanadep/foundational-llama-scratch-epic-model
- Ollama
How to use namanadep/foundational-llama-scratch-epic-model with Ollama:
ollama run hf.co/namanadep/foundational-llama-scratch-epic-model
- Unsloth Studio
How to use namanadep/foundational-llama-scratch-epic-model with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for namanadep/foundational-llama-scratch-epic-model to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for namanadep/foundational-llama-scratch-epic-model to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for namanadep/foundational-llama-scratch-epic-model to start chatting
- Docker Model Runner
How to use namanadep/foundational-llama-scratch-epic-model with Docker Model Runner:
docker model run hf.co/namanadep/foundational-llama-scratch-epic-model
- Lemonade
How to use namanadep/foundational-llama-scratch-epic-model with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull namanadep/foundational-llama-scratch-epic-model
Run and chat with the model
lemonade run user.foundational-llama-scratch-epic-model-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
Training a LLaMA-Style Transformer From Scratch: A Negative Result
Attempts to train a small decoder-only transformer completely from scratch (no pretrained weights) on a Ramayana/Mahabharata/Hinglish text corpus, then compares it against fine-tuning an existing pretrained model (Qwen2.5-0.5B-Instruct) on the same data. The scratch model does not reach coherent output. This repository includes the raw evaluation transcripts so that claim can be checked directly rather than taken on faith.
Full code and write-up: github.com/namanadep/foundational-llama-scratch-epic-model.
What actually got trained
The two published checkpoints are smaller than their filenames suggest. Parameter counts below are measured directly from the checkpoint state dicts:
| Checkpoint | Filename says | Measured parameters | Architecture |
|---|---|---|---|
weights/stage1_pretrained.pt |
(pretraining stage) | 26.75M | dim 384, 8 layers, vocab 16,384 |
weights/model_125m_final.pt |
"125M" | 13.50M | dim 256, 6 layers, vocab 16,384 |
The first training attempt used a 125M-parameter configuration and overfit, collapsing into repetition loops (documented in FOUNDATIONAL_MODEL_EPIC/docs/IMPLEMENTATION_PLAN_AND_DIAGNOSIS.md on the GitHub repo). The fix was to shrink the architecture to roughly 30M parameters and add a better tokenizer; the final published checkpoint went smaller still, to 13.5M, but kept the "125m" filename from the original abandoned attempt.
Results
The scratch model's output, on every one of 20 fixed evaluation prompts, is grammatically incoherent: keyword association with no sentence structure. Example (namaste, aap kaise hain?): "insan namaste namastermpt namasteonon namaste rachanatmakata!! prakata! nahi! premachamda!..."
The LoRA-fine-tuned Qwen2.5-0.5B-Instruct comparison model produces fluent, grammatical sentences, a real and meaningful difference from the scratch model. It is not reliably accurate: of its 20 evaluation responses, roughly 2 are both fluent and correct. Most either don't answer the question asked, state something factually wrong, or hallucinate unrelated content, and one response degenerates into the same kind of repetition loop the scratch model exhibits throughout. The specific example often cited for this comparison, "what was Arjuna's bow called," gets answered without ever naming the bow (Gandiva) and with a factually wrong attribution.
Full transcripts for both models are on the GitHub repo (eval/evaluation_results.json and eval/evaluation_0.5b_epic_results.json), along with the analysis of why the fine-tuned model gets so many answers wrong (a training-data task-format mismatch, not a fundamental limitation).
Takeaway
Fine-tuning a pretrained model produces fluent output where scratch training on the same small dataset does not. That part is real. It does not, on this evidence, produce a reliably accurate domain question-answering system, and training a foundational model from scratch was only tested at one small scale and one architecture, not across the range that would support a general claim about token requirements.
Repository structure
weights/hinglish_125m.gguf: quantized GGUF export ofmodel_125m_final.ptfor Ollama.weights/stage1_pretrained.pt: pretraining-stage checkpoint (81.8 MB on disk, 26.75M parameters).weights/model_125m_final.pt: final checkpoint after instruction tuning (37.2 MB on disk, 13.50M parameters).FOUNDATIONAL_MODEL_EPIC/: code, tokenizer, training scripts, and evaluation transcripts. Mirrored and kept current on GitHub.Foundational_Model_Scratch_Training_on_Ramayana_Mahabharata.pptx: presentation deck.
- Downloads last month
- 26
We're not able to determine the quantization variants.