Wasabi-30B

Wasabi-30B is Sionic AI's Japanese document fine-tune of Muse Glimmer 30B. It transcribes page images into Markdown, including headings, paragraphs, tables and mathematical notation.

The checkpoint is provided as merged BF16 weights in two safetensors shards, approximately 60 GB in total. No separate adapter or base-model download is needed.

Document processing

Fine-tuning focuses on Japanese text structure, paragraph continuity and faithful transcription. The full document-processing pipeline also handles page orientation, complex layouts and small text annotations through preprocessing and output refinement.

The complete pipeline is maintained in Sionic AI's private Wasabi repository, accessible to authorized collaborators. The Docker package supplied for evaluation includes the full inference pipeline and its runtime assets.

Quickstart

This example transcribes one upright page image. Convert PDFs to page images first. Allow GPU memory for the weights, image processing and generated tokens; device_map="auto" distributes the model across available devices.

Install PyTorch for your CUDA environment, then:

pip install "transformers==5.15.0" accelerate pillow huggingface_hub

Save the following as transcribe.py and run python transcribe.py page.jpg > page.md:

import argparse
from pathlib import Path

import torch
from huggingface_hub import hf_hub_download
from PIL import Image, ImageOps
from transformers import AutoModelForImageTextToText, AutoProcessor

parser = argparse.ArgumentParser()
parser.add_argument("image")
parser.add_argument("--rotate", type=int, choices=[0, 90, 180, 270], default=0,
                    help="Additional clockwise rotation in degrees")
args = parser.parse_args()

model_id = "sionic-ai/Wasabi-30B"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
    model_id, dtype=torch.bfloat16, device_map="auto"
).eval()

prompt_path = hf_hub_download(model_id, "prompt.txt")
prompt = Path(prompt_path).read_text(encoding="utf-8")
with Image.open(args.image) as source:
    image = ImageOps.exif_transpose(source).convert("RGB")
if args.rotate:
    image = image.rotate(-args.rotate, expand=True)
messages = [{"role": "user", "content": [
    {"type": "image", "image": image},
    {"type": "text", "text": prompt},
]}]
inputs = processor.apply_chat_template(
    messages, add_generation_prompt=True, tokenize=True,
    return_dict=True, return_tensors="pt", reasoning_strength="low",
).to(model.device)

with torch.inference_mode():
    output = model.generate(**inputs, max_new_tokens=8192, do_sample=False)
generated = output[0, inputs["input_ids"].shape[1]:]
print(processor.decode(generated, skip_special_tokens=True))

The example applies EXIF orientation metadata. For a page still turned sideways, use python transcribe.py page.jpg --rotate 90 > page.md. Automatic visual orientation correction is part of the private pipeline.

Use the included transcription prompt with the supplied chat template. The example covers direct model inference. For deployment support, contact Sionic AI.

File checksums are provided in SHA256SUMS.

Limitations

  • Dense or low-quality pages can lose text, table structure or reading order.
  • Use upright page images and check important details against the source.
  • Retrieval, question answering and general chat require separate evaluation.

Licence and attribution

Wasabi-30B is released under AGPL-3.0. See LICENSE and NOTICE for terms and attribution.

The base model is Muse Glimmer 30B, revision 97c77dff50b2797bcc558fa2d909761dbc575c59. Its Apache-2.0 licence and publisher usage policy are included in notices/.

Downloads last month
39
Safetensors
Model size
30B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for sionic-ai/Wasabi-30B

Finetuned
(56)
this model
Quantizations
1 model