Text Classification
ONNX
Safetensors
GGUF
English
text-segmentation
entity-linking
quotation-attribution
multiple-choice
question-answering
summarization
modernbert
conversational
Instructions to use freeideas/UsefulLocalModels 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 freeideas/UsefulLocalModels 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 freeideas/UsefulLocalModels:Q4_K_M # Run inference directly in the terminal: llama cli -hf freeideas/UsefulLocalModels:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf freeideas/UsefulLocalModels:Q4_K_M # Run inference directly in the terminal: llama cli -hf freeideas/UsefulLocalModels:Q4_K_M
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 freeideas/UsefulLocalModels:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf freeideas/UsefulLocalModels:Q4_K_M
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 freeideas/UsefulLocalModels:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf freeideas/UsefulLocalModels:Q4_K_M
Use Docker
docker model run hf.co/freeideas/UsefulLocalModels:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use freeideas/UsefulLocalModels with Ollama:
ollama run hf.co/freeideas/UsefulLocalModels:Q4_K_M
- Unsloth Desktop
- Pi
How to use freeideas/UsefulLocalModels with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf freeideas/UsefulLocalModels:Q4_K_M
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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "freeideas/UsefulLocalModels:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use freeideas/UsefulLocalModels with Docker Model Runner:
docker model run hf.co/freeideas/UsefulLocalModels:Q4_K_M
- Lemonade
How to use freeideas/UsefulLocalModels with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull freeideas/UsefulLocalModels:Q4_K_M
Run and chat with the model
lemonade run user.UsefulLocalModels-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use freeideas/UsefulLocalModels with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf freeideas/UsefulLocalModels:Q4_K_M
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:8080/v1 hermes config set model.default freeideas/UsefulLocalModels:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use freeideas/UsefulLocalModels with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf freeideas/UsefulLocalModels:Q4_K_M
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:8080/v1 \ --custom-model-id "freeideas/UsefulLocalModels:Q4_K_M" \ --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"
README: same-subject-r3
Browse files
README.md
CHANGED
|
@@ -19,6 +19,7 @@ Small models that run on an ordinary CPU and take frequent, repetitive work away
|
|
| 19 |
|
| 20 |
| Folder | What it does | Size |
|
| 21 |
|---|---|---|
|
|
|
|
| 22 |
| [`same-subject-r2/`](same-subject-r2/) | Says whether a new passage or message continues the subject of the text before it. Used to cut a long stream (a book, a chat, meeting notes) into topics for a summary tree. | 150M parameters |
|
| 23 |
| [`entity-link-r1/`](entity-link-r1/) | Says whether a name in a sentence refers to a given known entity (a person, place, thing). Used to link each mention in a stream of text to the right entity in a growing graph. | 150M parameters |
|
| 24 |
| [`speaker-r1/`](speaker-r1/) | Says whether a given person speaks a quoted paragraph of fiction, from the paragraph and the text before it. Used to attribute dialogue in a stream of text. | 150M parameters |
|
|
@@ -30,6 +31,36 @@ Made by **Carl Free**, an AI engineer who trains small, specialized models that
|
|
| 30 |
|
| 31 |
---
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
# same-subject-r2
|
| 34 |
|
| 35 |
A cross-encoder (a model that reads two texts together and scores them) fine-tuned from [Alibaba-NLP/gte-reranker-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-reranker-modernbert-base) to answer one question: **is the new text about the same subject as the earlier text?** It returns a probability. It is the classifier behind SumEng, which builds a pyramid of summaries over text that arrives in order: the classifier decides where each topic ends, and a language model only writes one summary per topic.
|
|
|
|
| 19 |
|
| 20 |
| Folder | What it does | Size |
|
| 21 |
|---|---|---|
|
| 22 |
+
| [`same-subject-r3/`](same-subject-r3/) | The same task as r2, trained on more kinds of text: textbooks, novels, chats, and pairs of summaries. Better than r2 on every kind it was tested on. For non-commercial use (see its training data). | 150M parameters |
|
| 23 |
| [`same-subject-r2/`](same-subject-r2/) | Says whether a new passage or message continues the subject of the text before it. Used to cut a long stream (a book, a chat, meeting notes) into topics for a summary tree. | 150M parameters |
|
| 24 |
| [`entity-link-r1/`](entity-link-r1/) | Says whether a name in a sentence refers to a given known entity (a person, place, thing). Used to link each mention in a stream of text to the right entity in a growing graph. | 150M parameters |
|
| 25 |
| [`speaker-r1/`](speaker-r1/) | Says whether a given person speaks a quoted paragraph of fiction, from the paragraph and the text before it. Used to attribute dialogue in a stream of text. | 150M parameters |
|
|
|
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
+
# same-subject-r3
|
| 35 |
+
|
| 36 |
+
The successor to `same-subject-r2` below: the same model, input, files and use, retrained on more kinds of text. It answers **is the new text about the same subject as the earlier text?** and returns a probability.
|
| 37 |
+
|
| 38 |
+
## Results
|
| 39 |
+
|
| 40 |
+
AUC on held-out pairs (0.5 is guessing):
|
| 41 |
+
|
| 42 |
+
| Pairs | r2 | r3 |
|
| 43 |
+
|---|---:|---:|
|
| 44 |
+
| r2's own test set (stories and meetings) | 0.815 | 0.823 |
|
| 45 |
+
| textbook passages (Astronomy 2e) | 0.80 | 0.90 |
|
| 46 |
+
| novel passages (The Time Machine) | 0.75 | 0.80 |
|
| 47 |
+
| chat messages (a LoCoMo conversation) | 0.89 | 0.96 |
|
| 48 |
+
| pairs of summaries (textbook and novel) | 0.63 | 0.72 |
|
| 49 |
+
|
| 50 |
+
Accuracy on r2's test set at 0.5: 74.7% (r2: 73.1%). In SumEng, on a whole textbook it never saw (Psychology 2e), groups of level-1 summaries now line up with the book's sections (Pk 0.32 against 0.47 with r2; lower is better), with the cutting rule waiting until a group holds three times the minimum before choosing where to cut. Between summaries r3 says "same subject" far more readily than r2 (median near 1.0, against about 0.1), which is what it was trained to do; a low answer between two summaries is now a real break.
|
| 51 |
+
|
| 52 |
+
## Training
|
| 53 |
+
|
| 54 |
+
26,059 training pairs, each source in one split: r2's Holmes stories and QMSum meetings, plus the first chapters of Introduction to Sociology 3e and U.S. History (OpenStax, CC BY-NC-SA 4.0), The Adventures of Tom Sawyer, Silas Marner and The Scarlet Letter (public domain), and five LoCoMo conversations (snap-research/locomo, CC BY-NC 4.0). Validation: Astronomy 2e, The Time Machine and one more LoCoMo conversation. Textbook boundaries are the authors' subsection headings; novel scenes, chat topics within one sitting, and every summary were marked and written by Claude Sonnet. New in r3: pairs of summaries (the summaries of the segments before a segment, then its summary; "not yet" when a new section or chapter starts), for SumEng's checks above the first level. Book, textbook and summary pairs were shown two or three times per epoch. One epoch at learning rate 1e-5, batches of 16, on an A100; the second epoch overfit.
|
| 55 |
+
|
| 56 |
+
**Licence:** because part of the training text is licensed for non-commercial use only, use this model for non-commercial purposes. r2 has no such limit.
|
| 57 |
+
|
| 58 |
+
```sh
|
| 59 |
+
uvx --from huggingface_hub hf download freeideas/UsefulLocalModels --include "same-subject-r3/*" --local-dir models
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
---
|
| 63 |
+
|
| 64 |
# same-subject-r2
|
| 65 |
|
| 66 |
A cross-encoder (a model that reads two texts together and scores them) fine-tuned from [Alibaba-NLP/gte-reranker-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-reranker-modernbert-base) to answer one question: **is the new text about the same subject as the earlier text?** It returns a probability. It is the classifier behind SumEng, which builds a pyramid of summaries over text that arrives in order: the classifier decides where each topic ends, and a language model only writes one summary per topic.
|