Text Generation
MLX
Safetensors
English
lemonseed
mixture-of-experts
gated-deltanet
mixture-of-depths
rocm
base-model
Instructions to use lemonade-sdk/lemonseed-1.5b-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use lemonade-sdk/lemonseed-1.5b-base with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("lemonade-sdk/lemonseed-1.5b-base") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use lemonade-sdk/lemonseed-1.5b-base with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "lemonade-sdk/lemonseed-1.5b-base" --prompt "Once upon a time"
- Atomic Chat
File size: 1,345 Bytes
438787b bd00f64 438787b 3b4cb5c 438787b | 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 | """LemonSeed 1.5B — minimal generation template.
LemonSeed is a custom hybrid (Gated-DeltaNet + attention + MoE + Mixture-of-Depths)
architecture and is NOT loadable via `transformers`.
Primary engine (C++/ROCm): https://github.com/Geramy/LSE
Reference docs: https://github.com/Geramy/lemonseed-docs
This file is the simple MLX reference path (needs the lemonseed Python model code).
pip install mlx fastokens huggingface_hub
git clone https://github.com/Geramy/lemonseed-docs && cd lemonseed
Then download this repo's files (model.safetensors, config.json, tokenizer.json)
next to each other and run:
python example_generate.py
"""
import sys
sys.path.insert(0, ".") # so `lemonseed` package is importable
from lemonseed.model import load_model
from lemonseed.tokenizer import load_tokenizer
from lemonseed.generate import generate_text
MODEL = "model.safetensors" # config.json must sit alongside it
model = load_model(MODEL)
tok = load_tokenizer("qwen3.6") # uses the Qwen3.6 tokenizer (bundled tokenizer.json)
PROMPTS = [
"The capital of France is",
"def fibonacci(n):",
"Question: What is 8 × 6?\nLet's think step by step.\nAnswer:",
"Once upon a time",
]
for p in PROMPTS:
out = generate_text(model, tok, p, max_new_tokens=64, greedy=True)
print("=" * 60)
print(out)
|