Text Generation
Transformers
Safetensors
GGUF
English
llm
small-language-model
rag
knowledge-packs
llama-cpp
retrieval
tool-calling
conversational
Run this model with HF Jobs
Run NoMusic/LSLM-1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/NoMusic/LSLM-1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/NoMusic/LSLM-1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/NoMusic/LSLM-1. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/NoMusic/LSLM-1. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use NoMusic/LSLM-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NoMusic/LSLM-1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NoMusic/LSLM-1")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("NoMusic/LSLM-1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use NoMusic/LSLM-1 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 NoMusic/LSLM-1:Q8_0 # Run inference directly in the terminal: llama cli -hf NoMusic/LSLM-1:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf NoMusic/LSLM-1:Q8_0 # Run inference directly in the terminal: llama cli -hf NoMusic/LSLM-1:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf NoMusic/LSLM-1:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf NoMusic/LSLM-1:Q8_0
Use Docker
docker model run hf.co/NoMusic/LSLM-1:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use NoMusic/LSLM-1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NoMusic/LSLM-1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NoMusic/LSLM-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NoMusic/LSLM-1:Q8_0
- SGLang
How to use NoMusic/LSLM-1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "NoMusic/LSLM-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NoMusic/LSLM-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "NoMusic/LSLM-1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NoMusic/LSLM-1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use NoMusic/LSLM-1 with Ollama:
ollama run hf.co/NoMusic/LSLM-1:Q8_0
- Unsloth Desktop
- Pi
How to use NoMusic/LSLM-1 with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf NoMusic/LSLM-1:Q8_0
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "NoMusic/LSLM-1:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use NoMusic/LSLM-1 with Docker Model Runner:
docker model run hf.co/NoMusic/LSLM-1:Q8_0
- Lemonade
How to use NoMusic/LSLM-1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull NoMusic/LSLM-1:Q8_0
Run and chat with the model
lemonade run user.LSLM-1-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use NoMusic/LSLM-1 with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf NoMusic/LSLM-1:Q8_0
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default NoMusic/LSLM-1:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use NoMusic/LSLM-1 with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf NoMusic/LSLM-1:Q8_0
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "NoMusic/LSLM-1:Q8_0" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
File size: 5,019 Bytes
eb3baa8 acbb326 297c633 8e1bda7 acbb326 ffe7551 acbb326 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | ---
license: apache-2.0
language:
- en
tags:
- llm
- small-language-model
- rag
- knowledge-packs
- llama-cpp
- gguf
- retrieval
- tool-calling
pipeline_tag: text-generation
library_name: transformers
---
# LSLM 1 β Logical Small Language Model
**A small language model that does not memorize the world. It looks facts up.**
LSLM 1 is a ~253M-parameter decoder-only transformer trained from scratch. Unlike a
conventional LLM, it is deliberately *not* trained to store facts in its weights. Instead it
reads facts from **swappable knowledge packs** on disk β small SQLite full-text indexes β and
answers only from the passages it retrieves, citing each fact with a `[n]` source marker.
Swap the pack, and the model's knowledge changes β the model itself stays the same.
- **Parameters:** 252,968,960 (tied embeddings)
- **Architecture:** decoder-only transformer, RMSNorm, RoPE, GQA (16 heads / 8 KV heads), SwiGLU
- **Context:** 2048 (runs at 3072 in the app)
- **Vocabulary:** 32,000 (custom SentencePiece BPE)
- **License:** Apache 2.0
## The idea
A normal LLM stores the world in its weights, which is why it needs billions of parameters and
still hallucinates. LSLM takes a **novel approach**: the model stays small and learns only
**language, logic and tool use**, while the facts live outside it, in on-disk knowledge packs. On any factual
question the model must search first, answer only from the retrieved passages, and cite the
source. If the packs have nothing, it says so plainly instead of guessing.
This is the first release of LSLM's own model. The earlier `LSLM-beta` was a fine-tuned
Granite 4.2 3B; LSLM 1 replaces it with a model trained from scratch for this exact task.
## Why it matters
- **Honesty by design.** The model is trained so the pack wins over memory. In tests, when a
fact was *changed* in the pack, LSLM 1 reported the pack's value 90% of the time and almost
never fell back to the memorized value.
- **Small and fast.** ~253M parameters run at ~360 tokens/s in the app β about 4Γ faster than
a 1.7B baseline β while beating a 600M model on the same task.
- **Swappable knowledge.** Change the pack (a different language, a private corpus, a newer
snapshot) and the same weights answer from it. No retraining.
- **Runs anywhere.** GGUF weights work with llama.cpp, Ollama and LM Studio on macOS, Windows
and Linux.
## Evaluation
LSLM 1 was compared against three open models of its class and above on 298 questions across
seven sets, in three modes:
- **closed** β the model alone (no packs, no tools);
- **env** β inside LSLM's environment (its prompt, the search tool and the packs);
- **web** β env plus live web search.
| model | closed | env | web |
|---|---|---|---|
| lfm3-1.7b (1.7B) | 48% | 94% | 97% |
| **LSLM 1 (253M)** | **0%** | **70%** | **53%** |
| baguettotron (321M) | 34% | 56% | 100% |
| bag-600m (600M) | 38% | 1% | 0% |
The headline result: **alone, LSLM 1 answers 0% correctly β it has almost no facts memorized.
Inside its environment it reaches 70%, beating the 600M baseline (1%) and the 321M baseline
(56%), and trailing only the 1.7B model.** That is exactly the point: the knowledge comes from
the packs, not from the weights.
Per-set results in the environment (correct answers):
| set | LSLM 1 |
|---|---|
| facts from unseen articles | 92% |
| pack value overrides memory | 90% |
| made-up subject β "not found" | 87% |
| well-known facts | 79% |
| two packs disagree β report both | 6% |
| arithmetic | 0% |
Known weaknesses: arithmetic is near zero β the model does not yet read
mathematical formulas from the packs and substitute values into them, which is planned as a core
skill (reading + reasoning), not an external tool; and reporting *both* sides when two packs
disagree is still weak (6%) β the next training iteration targets both. Web search reaches 53%.
## Quick start
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("NoMusic/LSLM-1")
tokenizer = AutoTokenizer.from_pretrained("NoMusic/LSLM-1")
```
Or run the GGUF with llama.cpp / Ollama / LM Studio. The full application (local web UI,
knowledge-pack search, installer for macOS/Windows/Linux) is on GitHub:
https://github.com/andrewtab4-commits/LSLM
## Roadmap
| version | model | state |
|---|---|---|
| LSLM beta | Granite 4.2 3B + adapter | works now |
| **LSLM 1** | own ~253M model | **this release** |
| LSLM 2 | own ~500M model | next |
| LSLM 3 | own ~1B model | later β depends on funding and donations |
| LSLM 4 | own ~3B model, many languages | long-term goal |
## Support
LSLM is funded by one person out of pocket. Help fund LSLM 2 and LSLM 3 (they need rented GPUs):
**[lslm.netlify.app](https://lslm.netlify.app)**.
## Training
Trained from scratch on ~3.8B tokens (β15 tokens/parameter) on a single H100, then fine-tuned
on pack-conflict and web-search examples. Full training code is in the GitHub repository.
|