Instructions to use leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }'
leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx
This model was converted to MLX format from haykgrigorian/TimeCapsuleLLM-v2-llama-1.2B using 8-bit uniform quantization optimized for Apple Silicon.
TimeCapsuleLLM-v2-llama-1.2B is a 1.2B-parameter Llama-architecture model trained from scratch on 112 GB of historical English texts from London (1800–1875). It features 22 layers, Grouped Query Attention (GQA) with 16 query / 8 KV heads, and a custom BPE tokenizer (32K vocab). The model generates text in the style of historical English from that era.
Use with mlx
pip install -U mlx-lm
python -m mlx_lm.generate --model leonsarmiento/TimeCapsuleLLM-v2-llama-1.2B-8bit-mlx --max-tokens 256 --temperature 0.5 --prompt "The streets of London were"
Quantization Details
| Metric | Value |
|---|---|
| Quantization type | 8-bit uniform |
| Average | 8.501 bits per weight |
| Group size | 64 |
| Method | mlx_lm |
| Total output size | ~1.2 GB (1 shard) |
Recommended Inference Parameters
This is a base completion model — it performs raw text continuation. In LM Studio, use completion mode or select the Llama 2 template for best results.
| Parameter | Value |
|---|---|
temperature |
0.7 |
top_p |
0.9 |
top_k |
64 |
min_p |
0.01 |
repetition_penalty |
1.1 |
max_tokens |
200+ |
- Downloads last month
- 85
8-bit