FluidInference/clef-text-0.6b

Model

clef-text-0.6b

0

2 commits

1 linked in READMEs

updated Oct 10, 2026

See the code

README

clef-text-0.6b

A 0.70B-parameter text decision model distilled from Cloudflare's clef-flash (9B): Qwen3-0.6B (LoRA merged) + Clef's joint schema head. Same Jev / SystemOne contract: one probability per option of every typed question, one forward pass. Good at routing and classification; not a knowledge model (see the table).

Apple silicon / Neural Engine build: FluidInference/clef-text-0.6b-coreml.

Usage

joint_schema_model.py is Cloudflare's unchanged Clef module (record encoding, head, ClefModel).

import json, sys, torch
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
from transformers import AutoModelForCausalLM, AutoTokenizer

path = snapshot_download("FluidInference/clef-text-0.6b")
sys.path.insert(0, path)
from joint_schema_model import ClefModel, JointSchemaHead, collate_records, encode_record

tokenizer = AutoTokenizer.from_pretrained(path)
backbone = AutoModelForCausalLM.from_pretrained(path, dtype=torch.float32)
head = JointSchemaHead(**json.loads(open(f"{path}/joint_head_config.json").read()))
head.load_state_dict(load_file(f"{path}/joint_head.safetensors"))
model = ClefModel(backbone, head).eval()

record = {"state": "Our checkout is down and customers can't pay.",
          "questions": {"team": {"type": "choice", "instructions": "Which team should handle this?",
                                 "criteria": {"billing": "Payments", "engineering": "Bugs or outages"}},
                        "urgency": {"type": "score", "criteria": ["Low", "Normal", "High", "Critical"]}}}
encoded = encode_record(tokenizer, record)
with torch.inference_mode():
    logits = model(collate_records([encoded], tokenizer.pad_token_id, torch.device("cpu")))[0]
for question, question_logits in zip(encoded.questions, logits):
    print(question.question_id, dict(zip(question.option_ids, question_logits.softmax(-1).tolist())))

Quality (held-out test splits, gold accuracy)

Taskthis modelclef-flash 9B
DBpedia-1499.7100.0
AG News90.792.0
SST-290.094.0
BANKING7786.494.5
TweetEval offensive85.082.3
Yelp stars69.070.7
Emotion68.058.0
BoolQ82.390.7
MNLI72.384.3
ARC-Easy80.0100.0
CommonsenseQA65.094.3
ARC-Challenge60.797.3
all (5,124 q)79.188.2

Training: 24,208 records from 12 public datasets (train splits) labelled by clef-flash, KL (T = 2) + 0.3 gold CE, LoRA r64 + full head, 2 epochs on an M5 Pro.

License and credits

Apache-2.0. joint_schema_model.py and LICENSE are Cloudflare's (Apache-2.0). Teacher Cloudflare/clef-flash; base Qwen/Qwen3-0.6B. By Fluid Inference.

classification
clef
decision-model
distillation
endpoints_compatible
fluidinference
qwen3
safetensors
systemone
text-classification
text-embeddings-inference
text-generation
transformers
typed-output

FluidInference/clef-text-0.6b

Model

clef-text-0.6b

0

2 commits

1 linked in READMEs

updated Oct 10, 2026

See the code

README

clef-text-0.6b

A 0.70B-parameter text decision model distilled from Cloudflare's clef-flash (9B): Qwen3-0.6B (LoRA merged) + Clef's joint schema head. Same Jev / SystemOne contract: one probability per option of every typed question, one forward pass. Good at routing and classification; not a knowledge model (see the table).

Apple silicon / Neural Engine build: FluidInference/clef-text-0.6b-coreml.

Usage

joint_schema_model.py is Cloudflare's unchanged Clef module (record encoding, head, ClefModel).

import json, sys, torch
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
from transformers import AutoModelForCausalLM, AutoTokenizer

path = snapshot_download("FluidInference/clef-text-0.6b")
sys.path.insert(0, path)
from joint_schema_model import ClefModel, JointSchemaHead, collate_records, encode_record

tokenizer = AutoTokenizer.from_pretrained(path)
backbone = AutoModelForCausalLM.from_pretrained(path, dtype=torch.float32)
head = JointSchemaHead(**json.loads(open(f"{path}/joint_head_config.json").read()))
head.load_state_dict(load_file(f"{path}/joint_head.safetensors"))
model = ClefModel(backbone, head).eval()

record = {"state": "Our checkout is down and customers can't pay.",
          "questions": {"team": {"type": "choice", "instructions": "Which team should handle this?",
                                 "criteria": {"billing": "Payments", "engineering": "Bugs or outages"}},
                        "urgency": {"type": "score", "criteria": ["Low", "Normal", "High", "Critical"]}}}
encoded = encode_record(tokenizer, record)
with torch.inference_mode():
    logits = model(collate_records([encoded], tokenizer.pad_token_id, torch.device("cpu")))[0]
for question, question_logits in zip(encoded.questions, logits):
    print(question.question_id, dict(zip(question.option_ids, question_logits.softmax(-1).tolist())))

Quality (held-out test splits, gold accuracy)

Taskthis modelclef-flash 9B
DBpedia-1499.7100.0
AG News90.792.0
SST-290.094.0
BANKING7786.494.5
TweetEval offensive85.082.3
Yelp stars69.070.7
Emotion68.058.0
BoolQ82.390.7
MNLI72.384.3
ARC-Easy80.0100.0
CommonsenseQA65.094.3
ARC-Challenge60.797.3
all (5,124 q)79.188.2

Training: 24,208 records from 12 public datasets (train splits) labelled by clef-flash, KL (T = 2) + 0.3 gold CE, LoRA r64 + full head, 2 epochs on an M5 Pro.

License and credits

Apache-2.0. joint_schema_model.py and LICENSE are Cloudflare's (Apache-2.0). Teacher Cloudflare/clef-flash; base Qwen/Qwen3-0.6B. By Fluid Inference.

classification
clef
decision-model
distillation
endpoints_compatible
fluidinference
qwen3
safetensors
systemone
text-classification
text-embeddings-inference
text-generation
transformers
typed-output