Instructions to use textilelabs/Loom-Spark-1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use textilelabs/Loom-Spark-1.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="textilelabs/Loom-Spark-1.5")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("textilelabs/Loom-Spark-1.5") model = AutoModelForCausalLM.from_pretrained("textilelabs/Loom-Spark-1.5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use textilelabs/Loom-Spark-1.5 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 textilelabs/Loom-Spark-1.5:F32 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Spark-1.5:F32
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf textilelabs/Loom-Spark-1.5:F32 # Run inference directly in the terminal: llama cli -hf textilelabs/Loom-Spark-1.5:F32
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 textilelabs/Loom-Spark-1.5:F32 # Run inference directly in the terminal: ./llama-cli -hf textilelabs/Loom-Spark-1.5:F32
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 textilelabs/Loom-Spark-1.5:F32 # Run inference directly in the terminal: ./build/bin/llama-cli -hf textilelabs/Loom-Spark-1.5:F32
Use Docker
docker model run hf.co/textilelabs/Loom-Spark-1.5:F32
- LM Studio
- Jan
- vLLM
How to use textilelabs/Loom-Spark-1.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "textilelabs/Loom-Spark-1.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "textilelabs/Loom-Spark-1.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/textilelabs/Loom-Spark-1.5:F32
- SGLang
How to use textilelabs/Loom-Spark-1.5 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 "textilelabs/Loom-Spark-1.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "textilelabs/Loom-Spark-1.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "textilelabs/Loom-Spark-1.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "textilelabs/Loom-Spark-1.5", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use textilelabs/Loom-Spark-1.5 with Ollama:
ollama run hf.co/textilelabs/Loom-Spark-1.5:F32
- Unsloth Studio
How to use textilelabs/Loom-Spark-1.5 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 textilelabs/Loom-Spark-1.5 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 textilelabs/Loom-Spark-1.5 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for textilelabs/Loom-Spark-1.5 to start chatting
- Docker Model Runner
How to use textilelabs/Loom-Spark-1.5 with Docker Model Runner:
docker model run hf.co/textilelabs/Loom-Spark-1.5:F32
- Lemonade
How to use textilelabs/Loom-Spark-1.5 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull textilelabs/Loom-Spark-1.5:F32
Run and chat with the model
lemonade run user.Loom-Spark-1.5-F32
List all available models
lemonade list
- Atomic Chat
Loom Spark 1.5
Second of the Loom models Β· Textile Labs Β· successor to Loom Spark v1 (which remains available, unchanged)
Loom Spark 1.5 keeps everything that made the first Loom different β trained from scratch to trade actual knowledge for wisdom: self-aware, honest about its limits, warm, and skilled at exactly one real superpower β forming clean web-search queries for its agent harness to execute.
What changed from v1
| v1 | 1.5 | |
|---|---|---|
| parameters | 7.6M | 12.3M (384d Γ 6 layers Γ 6 heads) |
| offline discipline | occasional <lookup> leaks |
zero leaks in testing (mode markers on every turn) |
fake <result> blocks |
possible outside harness | structurally impossible (turns end at the query) |
| non-sequitur answers | sometimes | fixed at the curriculum level |
| math & small facts | shaky | heavier training weight |
Validation loss 0.326 vs v1's 0.337 β and the wins that matter are behavioral: in a 30-question offline battery, v1 leaked tool markup into plain chat constantly; 1.5 leaked zero times, and answers identity/restraint questions correctly from every angle we tried.
Prompt format (IMPORTANT β it is sensitive to format)
Same protocol as v1, but the mode marker now rides on EVERY user turn:
<tools:off>
<tools:off><user> what year did the Titanic sink?
<loom>
With tools on, the model ends its turn with <lookup>query</lookup> followed by
<|endoftext|>; YOUR harness executes the search and splices <result>β¦</result>
before continuing with <loom>. Stop generation at <|endoftext|> or <user>.
Option A β plain transformers
from transformers import GPT2LMHeadModel, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("TextileLabs/Loom-Spark-1.5")
model = GPT2LMHeadModel.from_pretrained("TextileLabs/Loom-Spark-1.5")
prompt = "<tools:off>\n<tools:off><user> who are you?\n<loom>"
ids = tok(prompt, return_tensors="pt").input_ids
out = model.generate(ids, max_new_tokens=90, do_sample=True, temperature=0.8,
top_k=50, pad_token_id=tok.eos_token_id)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=False))
This is a standalone second-generation model β v1 keeps its own repo and card. Tested on transformers β₯ 4.40 and Python 3.9β3.13. The widget above prefills the correct format β keep both
<tools:β¦>markers or quality drops sharply.
Option B β llama.cpp / Ollama (offline persona)
loom-spark-1.5-f32.gguf carries the weights plus the custom BPE tokenizer with all
nine special tokens embedded. The ollama/Modelfile in this repo produces the offline
persona (greetings, identity, honest deferrals):
ollama pull hf.co/textilelabs/Loom-Spark-1.5
ollama create loom-spark-15 -f Modelfile
ollama run loom-spark-15 "hi"
Raw runners can't execute searches β if a reply contains a <lookup>β¦</lookup>
query, that's the model saying "I'd look this up". For real internet answers,
use the harness.
Option C β the harness (with internet)
Same package as v1 (harness/ folder here) β it auto-detects 1.5's format:
pip install ./harness
loom-chat # terminal agent, live DuckDuckGo searches
loom-web --port 7860 # local chat GUI with tools toggle + lookup feed
Architecture & training
Decoder-only transformer, pre-LN GELU blocks, tied embeddings, learned positions. 6 layers / 6 heads / d_model 384 / context 256 / vocab 4096 (fresh custom BPE). 12,318,... β 12.3M params.
Trained entirely on our procedurally generated curriculum (zero external datasets) on a CPU-only Dell OptiPlex i5-4690: 3,914 steps β 32M tokens over ~5.8 hours, final validation loss 0.343 (best checkpoint 0.326, shipped).
Limitations (by design)
Still knows almost nothing β that remains the point. Not for facts, medicine, law, finance, or anything where being wrong costs more than company.
- Downloads last month
- -