Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: apache-2.0

Highlights

Measured against its base model under identical conditions (same prompts, same scoring):

  • 2.7× more reliable legal citations — citation-integrity accuracy 42.1% vs 15.8% on the CBLRE benchmark.
  • +22.9 points on instruction-following — IFEval prompt-strict 53.2% vs 30.3%.
  • Balanced bilingual competence — privacy-compliance parity ratio of 1.00 (English 90.9% / French 90.9%).
  • Stronger English legal reasoning — MMLU international law 76.0% vs 70.3%.
  • No loss of general capability — MMLU unchanged (~69.8%); complex multi-step reasoning improves (BBH 79.0% vs 68.6%).
  • Vision-capable — reads and reasons over images and documents, inherited from the base.

Intended use

flash-1-mini is intended as a drafting and research assistant for Canadian legal and regulatory workflows, in English and French, where citation correctness and faithful instruction-following matter. It is suitable for legal-tech builders, compliance teams, and Canadian regulated-industry operators.

It is designed to assist legal professionals, not to replace their judgment. Outputs — especially citations — should be verified against primary sources before reliance.

How to use

flash-1-mini uses the Qwen3_5ForConditionalGeneration architecture, which is native to Transformers ≥ 5.5 — no trust_remote_code is required. Install a recent Transformers:

bash

pip install "transformers>=5.5"

python

import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "simpledirect/flash-1-mini"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id, dtype=torch.bfloat16, device_map="auto"
)
# Text
messages = [{"role": "user", "content": [
{"type": "text", "text": "What does section 1 of the Canadian Charter of Rights and Freedoms do?"}
]}]
prompt = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
inputs = processor(text=[prompt], return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(processor.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

For image input, include {"type": "image"} in the message content and pass images=[img] to the processor.

Thinking mode

Like its base model, flash-1-mini thinks by default — it emits a <think>...</think> reasoning block before the final answer. For many legal drafting tasks you will want the direct answer only. Disable thinking by passing enable_thinking=False through the chat template:

python

prompt = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=False,
enable_thinking=False, # direct kwarg; emits an empty <think></think> block so the model answers directly
)

When serving via vLLM, pass --reasoning-parser qwen3; to disable thinking per request, set chat_template_kwargs={"enable_thinking": False} in the request body (or keep thinking on for complex reasoning where it helps).

Serving

The model serves with vLLM for production text and multimodal inference (Transformers ≥ 5.5). Greedy decoding (temperature 0) is recommended for legal tasks where determinism matters.

Quantized / GGUF / Ollama

Quantized GGUF variants (and therefore Ollama hosting) are planned but not yet released. flash-1-mini uses Qwen3.5's hybrid linear-attention (Gated DeltaNet / SSM) architecture; GGUF conversion of this architecture succeeds, but verified GGUF inference depends on llama.cpp runtime support for these layers, which is still maturing. When verified, GGUF variants will be published as text-only (the vision tower is not carried in GGUF). Until then, use the bf16 weights above for both text and multimodal inference. To run in lower precision today, load the bf16 weights with bitsandbytes 4-bit/8-bit via BitsAndBytesConfig.

Benchmarks

All figures are flash-1-mini vs the Qwen3.5-4B base under identical conditions (same prompts, few-shot counts, scoring, greedy decoding). See the SimpleDirect benchmarking methodology and CBLRE eval-set documentation for full protocol.

CapabilityBaseflash-1-mini
Legal citation integrity (CBLRE)15.8%42.1%
Instruction-following (IFEval, prompt-strict)30.3%53.2%
English legal — international law (MMLU)70.3%76.0%
English legal — jurisprudence (MMLU)79.6%81.5%
Complex reasoning (BBH)68.6%79.0%
General knowledge (MMLU)69.8%69.8%
Privacy-compliance bilingual parity (FR/EN)1.00

Where it is weaker

Specialization carried measurable costs, reported here in full:

  • Retrieval (RAG): source-attribution accuracy regressed (80.5% → 75.5% on a leak-proof held-out set). flash-1-mini is not a retrieval/RAG leader.
  • Function-calling (BFCL v4): overall regressed (37.7% → 28.6%), with multi-turn the weakest sub-category.
  • French professional-law MCQ (Global-MMLU FR): regressed (49.0% → 44.6%).
  • CBLRE Quebec civil law: regressed (95.0% → 90.0%).

If your workload is primarily retrieval-grounded QA or tool/function-calling orchestration, evaluate carefully against these numbers.

Training

flash-1-mini is a supervised fine-tune of Qwen3.5-4B using parameter-efficient adapters (LoRA with DoRA, rank 32 / alpha 64, RS-LoRA), with the vision tower frozen, on a bilingual Canadian legal corpus weighted toward citation production and Quebec civil-law content. The trained adapter was merged into the base weights and the checkpoint canonicalized for serving. The architecture is unchanged from the base.

Limitations and responsible use

  • Not legal advice. flash-1-mini produces information to assist qualified professionals; it does not practice law and its outputs are not a substitute for a lawyer.
  • Verify citations. Citation accuracy is materially improved over the base but is not perfect; verify against primary sources.
  • Bilingual, not omniscient in French. Parity is strong on tested tracks but French professional-law MCQ regressed; do not assume uniform French superiority.
  • Hallucination. Like all LLMs, it can produce confident, incorrect output.
  • Quebec register. The model is evaluated for legal correctness, not certified for Quebec-French dialectal register.

License and attribution

flash-1-mini is released under the Apache License 2.0. It is a modified derivative work of Qwen3.5-4B (© Alibaba Cloud / Qwen Team, Apache-2.0). See the LICENSE and NOTICE files in this repository for the full license text and the required attribution and modification statement.

Citation

bibtex

@misc{simpledirect2026flash1mini,
title = {flash-1-mini: A Bilingual Canadian Legal Language Model},
author = {{Alpine Pacific Trading Inc. (operating as SimpleDirect)}},
year = {2026},
note = {Version flash-1-mini-20260602. Derivative of Qwen3.5-4B (Apache-2.0).},
howpublished = {\url{https://huggingface.co/simpledirect/flash-1-mini}}
}

Model provider

simpledirect

Model tree

Base

Qwen/Qwen3.5-4B

Fine-tuned

this model

Modalities

Input

Video, Text, Image

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today