Bonsai-27B-GGUF
lmstudio-community · Kit
A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…
Summarizes, answers questions about and continues book-length text with a fine-tuned 27B model that uses Gated DeltaNet layers, in English and Japanese. For people who work with long documents.
Qwen3.8-27B-Longbook27-v2 is a kit in the Writing category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download summerAIO/Qwen3.8-27B-Longbook27-v2
Longbook27 v2 is a 27B language model, tuned further to read and write whole books, papers and lengthy reports. Version 2 improves on version 1 in behavior and output quality. Its layers include Gated DeltaNet linear attention, and the code for that design comes inside the repository, so loading needs trust_remote_code=True. It works in English and Japanese.
It suits people who read, summarize or extend long documents and have a GPU with enough memory.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Publishing | Editors | Summarize a manuscript chapter by chapter | Reading a book file and getting a chapter summary |
| Research | Analysts | Ask questions about long papers and reports | Checking a claim against a lengthy report |
| Writing | Authors | Continue long-form writing with a model | Extending a draft in the same style |
If you have no GPU with at least 24 GB of memory, you can skip it, since the card says CPU offloading is not supported.
| Use case | Who | What they get back |
|---|---|---|
| Book summaries | Editors | A summary of long text, best with greedy decoding |
| Long-document questions | Researchers | Answers drawn from a lengthy source |
| Continuation | Writers | New text that follows on from a long draft |
pip install -U huggingface_hub hf download summerAIO/Qwen3.8-27B-Longbook27-v2
pip install -U transformers accelerate bitsandbytes # Optional: much faster linear-attention kernels pip install flash-linear-attention pip install causal-conv1d --no-build-isolation
Load the tokenizer and model, build a chat prompt that holds your text, and generate. The card's snippet names its model path with a summerMC prefix, so use the repository you downloaded from. Set USE_4BIT to False for bf16 on an 80 GB GPU.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
model_id = "summerMC/Qwen3.8-27B-Longbook27-v2"
USE_4BIT = True # False for bf16 on 80 GB GPUs
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True) # required
if USE_4BIT:
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
),
device_map={"": 0}, # keep everything on GPU 0
trust_remote_code=True, # required
)
else:
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map={"": 0},
trust_remote_code=True, # required
)
book_text = open("book.txt", encoding="utf-8").read()
messages = [{"role": "user", "content":
"Summarize this book chapter by chapter. Only use facts stated in the text.\n\n" + book_text}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True,
enable_thinking=False, # True: reason before answering
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=800,
do_sample=False, # greedy for faithful summaries
repetition_penalty=1.05,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))| Tool | What it does |
|---|---|
| trust_remote_code | Must be True, because the architecture ships as remote code |
| enable_thinking | Set True to let the model reason first, at the cost of more tokens |
| do_sample | False gives greedy output for summaries and answers |
| repetition_penalty | Keep it near 1.05 to avoid loops |
You save a book as book.txt and ask the model to summarize it chapter by chapter using only facts from the text. With greedy decoding and up to 800 new tokens, a summary prints in your terminal. Check it against the source.
This model is meant for long text, so give it real text rather than a placeholder and keep your request specific. A good first try is a short chapter in 4-bit mode with thinking off.
Under the hood, Gated DeltaNet linear-attention layers sit among the usual attention layers, and the custom kernels need everything on the GPU. For creative writing the card suggests sampling with temperature 0.7, top-p 0.8 and top-k 20.
Summarizes, answers questions about and continues book-length text with a fine-tuned 27B model that uses Gated DeltaNet layers, in English and Japanese. For people who work with long documents.
Made by summerAIO on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: Longbook27 v2 is a 27B language model, tuned further to read and write whole books, papers and lengthy reports. Version 2 improves on version 1 in behavior and output quality. Its layers include Gated DeltaNet linear attention, and the code for that design comes inside the repository, so loading needs trust_remote_code=True. It works in English and Japanese.
Who it suits: It suits people who read, summarize or extend long documents and have a GPU with enough memory.
Industry | Who uses it | How they use it | Example
Publishing | Editors | Summarize a manuscript chapter by chapter | Reading a book file and getting a chapter summary
Research | Analysts | Ask questions about long papers and reports | Checking a claim against a lengthy report
Writing | Authors | Continue long-form writing with a model | Extending a draft in the same style
If you have no GPU with at least 24 GB of memory, you can skip it, since the card says CPU offloading is not supported.
Where to use it:
Use case | Who | What they get back
Book summaries | Editors | A summary of long text, best with greedy decoding
Long-document questions | Researchers | Answers drawn from a lengthy source
Continuation | Writers | New text that follows on from a long draft
How to set it up:
pip install -U huggingface_hub
hf download summerAIO/Qwen3.8-27B-Longbook27-v2
pip install -U transformers accelerate bitsandbytes
# Optional: much faster linear-attention kernels
pip install flash-linear-attention
pip install causal-conv1d --no-build-isolation
How to use it: Load the tokenizer and model, build a chat prompt that holds your text, and generate. The card's snippet names its model path with a summerMC prefix, so use the repository you downloaded from. Set USE_4BIT to False for bf16 on an 80 GB GPU.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
model_id = "summerMC/Qwen3.8-27B-Longbook27-v2"
USE_4BIT = True # False for bf16 on 80 GB GPUs
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True) # required
if USE_4BIT:
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
),
device_map={"": 0}, # keep everything on GPU 0
trust_remote_code=True, # required
)
else:
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map={"": 0},
trust_remote_code=True, # required
)
book_text = open("book.txt", encoding="utf-8").read()
messages = [{"role": "user", "content":
"Summarize this book chapter by chapter. Only use facts stated in the text.\n\n" + book_text}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True,
enable_thinking=False, # True: reason before answering
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=800,
do_sample=False, # greedy for faithful summaries
repetition_penalty=1.05,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
Tool | What it does
trust_remote_code | Must be True, because the architecture ships as remote code
enable_thinking | Set True to let the model reason first, at the cost of more tokens
do_sample | False gives greedy output for summaries and answers
repetition_penalty | Keep it near 1.05 to avoid loops
Example: You save a book as book.txt and ask the model to summarize it chapter by chapter using only facts from the text. With greedy decoding and up to 800 new tokens, a summary prints in your terminal. Check it against the source.
For newcomers and experts: This model is meant for long text, so give it real text rather than a placeholder and keep your request specific. A good first try is a short chapter in 4-bit mode with thinking off.
Under the hood, Gated DeltaNet linear-attention layers sit among the usual attention layers, and the custom kernels need everything on the GPU. For creative writing the card suggests sampling with temperature 0.7, top-p 0.8 and top-k 20.
Long text in a chat prompt
Gated DeltaNet hybrid model
Greedy or sampled generation
Summary or answer printed
Good to know:
Title: Approximate VRAM needed
bf16: 54 GB
4-bit NF4: 17 GB
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download summerAIO/Qwen3.8-27B-Longbook27-v2
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 7 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| Qwen3.8-27B-Longbook27-v2 This page | 1,407 | 49 | 27.1B | apache-2.0 | |
| Hemmingway-1Shares transformers · text-generation · conversational | 3,631 | 902 | 26.9B | cc-by-nc-4.0 | |
| Hemmingway-1.5Shares transformers · text-generation · conversational | 3,322 | 61 | 26.9B | cc-by-nc-4.0 | |
| Smaug HumanizerShares transformers · text-generation · conversational | 1,162 | 29 | 12B | apache-2.0 | |
| Hy-MT2-1.8BShares transformers · text-generation · safetensors | 22,844 | 1,285 | 2B | apache-2.0 | |
| novel-humanize-4bShares text-generation · conversational · safetensors | 1,690 | 86 | 4B | cc-by-nc-4.0 |
lmstudio-community · Kit
A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…
LibertAIDAI · Kit
Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…
facebook · Kit
Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…
vennify · Kit
Rewrites English text with fewer grammar mistakes, using a T5 model trained on the JFLEG dataset. Made by vennify for writers, students and developers who want…
tencent · Kit
Translates between 33 languages on your own device with a 1.8B model squeezed to 1.25 bits, about 440 MB as GGUF files for llama.cpp. For developers adding off…
Sao10K · Kit
Writes stories and plays characters in multi-turn chat. An 8B Llama 3.1 fine-tune for creative writing and roleplay, aimed at hobbyists who run models on their…