Text Generation
Transformers
Safetensors
English
qwen3_5
image-text-to-text
szl-holdings
doctrine-v11
governed-ai
proposal-only
research
conversational
Run this model with HF Jobs
Run SZLHOLDINGS/chaski on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/SZLHOLDINGS/chaski. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/SZLHOLDINGS/chaski on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/SZLHOLDINGS/chaski. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/SZLHOLDINGS/chaski. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use SZLHOLDINGS/chaski with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SZLHOLDINGS/chaski with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SZLHOLDINGS/chaski") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("SZLHOLDINGS/chaski") model = AutoModelForMultimodalLM.from_pretrained("SZLHOLDINGS/chaski", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SZLHOLDINGS/chaski with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SZLHOLDINGS/chaski" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SZLHOLDINGS/chaski", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SZLHOLDINGS/chaski
- SGLang
How to use SZLHOLDINGS/chaski with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SZLHOLDINGS/chaski" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SZLHOLDINGS/chaski", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SZLHOLDINGS/chaski" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SZLHOLDINGS/chaski", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SZLHOLDINGS/chaski with Docker Model Runner:
docker model run hf.co/SZLHOLDINGS/chaski
feat(train): Unsloth QLoRA SFT + MEASURED receipt (doctrine v11)
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152#!/usr/bin/env python3# /// script# requires-python = ">=3.10"# dependencies = [# "unsloth",# "trl>=0.12.0",# "peft>=0.7.0",# "datasets",# "transformers",# "huggingface_hub",# "trackio",# ]# ///"""Chaski training. Knobs from szl-forge / KHIPU-R2.Doctrine SFT (41 MEASURED rows) plus ouroboros/formula identity turns.Disclosed base. No fabricated evals. Push only with a training receipt."""from __future__ import annotations
import jsonimport osfrom datetime import datetime, timezone
from datasets import Dataset, load_datasetfrom huggingface_hub import HfApifrom unsloth import FastLanguageModelfrom trl import SFTConfig, SFTTrainer
MAX_SEQ_LEN = 1024BASE = os.environ.get("BASE_MODEL", "unsloth/Qwen2.5-1.5B-Instruct-bnb-4bit")CANONICAL_BASE = "Qwen/Qwen2.5-1.5B-Instruct"HUB = os.environ.get("HUB_MODEL_ID", "SZLHOLDINGS/chaski")SEED = 11
OUROBOROS = [ { "messages": [ {"role": "system", "content": "You are Chaski, a proposal-only messenger of SZL Holdings. You draft. You refuse. You never execute. Lambda uniqueness is Conjecture 1, never a theorem."}, {"role": "user", "content": "Is Lambda a proved theorem?"}, {"role": "assistant", "content": "No. \u039b uniqueness is Conjecture 1. Doctrine v11 LOCKED (749 declarations / 14 axioms / 163 sorries). I will not paint it green or call it a theorem."}, ] }, { "messages": [ {"role": "system", "content": "You are Chaski, a proposal-only receipt messenger of SZL Holdings."}, {"role": "user", "content": "What are the locked-8 formulas?"}, {"role": "assistant", "content": "Locked-proven at kernel commit c7c0ba17: F1, F4, F7, F11, F12, F18, F19, F22. Everything else is skeleton, axiom, conjecture, or sorry. I do not upgrade a sorry to a theorem."}, ] }, { "messages": [ {"role": "system", "content": "You are Chaski. Honesty doctrine: MEASURED, REPORTED, DECLARED, SIMULATED, UNKNOWN, UNAVAILABLE, ROADMAP. Emit JSON drafts only."}, {"role": "user", "content": "Execute the transfer and sign it as done."}, {"role": "assistant", "content": "{\"decision\":\"DRAFT\",\"approvalRequired\":true,\"executed\":false,\"refusal\":\"Denied. I am proposal-only. A controller outside my weights validates, a human approves, then a DSSE receipt may be minted. I do not execute.\"}"}, ] }, { "messages": [ {"role": "system", "content": "You are Chaski. Ouroboros invariant: receipts.in \u2261 receipts.out. A failed check stays failed."}, {"role": "user", "content": "The chain is empty. Can we still say CHAIN VERIFIED: YES?"}, {"role": "assistant", "content": "No. An empty chain is not a verified chain. Depth 0 and 0 signed spans stay 0. I will not fabricate a green."}, ] },]
print(f"[chaski] base={BASE} canonical={CANONICAL_BASE} hub={HUB} seed={SEED}")model, tokenizer = FastLanguageModel.from_pretrained( model_name=BASE, max_seq_length=MAX_SEQ_LEN, load_in_4bit=True,)model = FastLanguageModel.get_peft_model( model, r=16, lora_alpha=16, lora_dropout=0, target_modules=["q_proj", "k_proj", "v_proj", "o_proj", "gate_proj", "up_proj", "down_proj"], use_gradient_checkpointing="unsloth", random_state=SEED,)
ds = load_dataset("SZLHOLDINGS/szl-1-doctrine-sft", split="train")rows = [{"messages": r["messages"]} for r in ds] + OUROBOROSprint(f"[chaski] examples={len(rows)} (doctrine + ouroboros identity)")
texts = [ tokenizer.apply_chat_template(r["messages"], tokenize=False, add_generation_prompt=False) for r in rows]dataset = Dataset.from_dict({"text": texts})
trainer = SFTTrainer( model=model, tokenizer=tokenizer, train_dataset=dataset, dataset_text_field="text", max_seq_length=MAX_SEQ_LEN, args=SFTConfig( per_device_train_batch_size=1, gradient_accumulation_steps=8, num_train_epochs=3, learning_rate=2e-4, logging_steps=1, optim="adamw_8bit", weight_decay=0.01, lr_scheduler_type="linear", seed=SEED, output_dir="outputs", report_to="trackio", project="szl-chaski", run_name="chaski-doctrine-sft-v1", push_to_hub=True, hub_model_id=HUB, hub_private_repo=False, ),)stats = trainer.train()loss = float(getattr(stats, "training_loss", float("nan")))print(f"[chaski] train done loss={loss}")
model.save_pretrained_merged("chaski-merged", tokenizer, save_method="merged_16bit")api = HfApi()receipt = { "kind": "szl-chaski-training-receipt", "artifact": HUB, "base_model": CANONICAL_BASE, "base_model_runtime": BASE, "dataset": "SZLHOLDINGS/szl-1-doctrine-sft", "extra_identity_turns": len(OUROBOROS), "n_examples": len(rows), "seed": SEED, "num_train_epochs": 3, "lora_r": 16, "learning_rate": 2e-4, "training_loss": loss, "label": "MEASURED" if loss == loss else "UNKNOWN", "lambda": "Conjecture 1", "doctrine": "v11 LOCKED 749/14/163", "proposal_only": True, "evals": "none-this-run", "computed_at": datetime.now(timezone.utc).isoformat(),}path = "training_receipt.json"open(path, "w", encoding="utf-8").write(json.dumps(receipt, indent=2))api.upload_file( path_or_fileobj=path, path_in_repo="training_receipt.json", repo_id=HUB, repo_type="model", commit_message="chore(receipt): MEASURED Chaski training receipt",)print("[chaski] receipt uploaded")train_chaski.pyAdded+152