Instructions to use ericrcwu/LUT_SLM_interpreter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ericrcwu/LUT_SLM_interpreter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ericrcwu/LUT_SLM_interpreter")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ericrcwu/LUT_SLM_interpreter", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ericrcwu/LUT_SLM_interpreter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ericrcwu/LUT_SLM_interpreter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ericrcwu/LUT_SLM_interpreter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ericrcwu/LUT_SLM_interpreter
- SGLang
How to use ericrcwu/LUT_SLM_interpreter 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 "ericrcwu/LUT_SLM_interpreter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ericrcwu/LUT_SLM_interpreter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ericrcwu/LUT_SLM_interpreter" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ericrcwu/LUT_SLM_interpreter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ericrcwu/LUT_SLM_interpreter with Docker Model Runner:
docker model run hf.co/ericrcwu/LUT_SLM_interpreter
LUT-SLM β Stage-1 Interpreter / Router (Qwen2.5-0.5B, full fine-tune)
The Stage-1 interpreter for the LUT-SLM project: a small text-only model (full fine-tune of
Qwen/Qwen2.5-0.5B-Instruct) that reads a user's free-text photo-editing request and decides how to
handle it before any LUT is generated. It emits an attribute_spec_text plus a route:
gradeβ a global color LUT can satisfy this β hand off to the Stage-2 generator.clarifyβ the request is underspecified / out of gamut β ask a clarifying question.refuseβ a single global LUT physically cannot do this (out_of_scope) or the ask is out of gamut (out_of_gamut) β refuse instead of fabricating a wrong grade.
It is the safety gatekeeper of the two-stage architecture: never silently grade a request that should
be refused or clarified. The Stage-2 generator adapters live in
ericrcwu/LUT_SLM_sft_adapters; the
training corpus + teacher caches are in
ericrcwu/LUT_SLM_interpreter_cache;
the source data is ericrcwu/LUT_SLM.
Subfolders
| Subfolder | What it is |
|---|---|
interp_full_smokefull/ |
The router. Full-run interpreter used by the deploy path (deploy/modal_app.py, INTERPRETER_SUBDIR = "interp_full_smokefull"). |
interp_intensity/ |
Intensity-fix experiment variant (re-captioned to surface magnitude buckets). Kept for comparison; not the deployed model. |
Each folder is a full model (model.safetensors β 0.99 GB, config.json, tokenizer, chat template) β
these are full fine-tunes, not adapters. Architecture: Qwen2, hidden size 896, 24 layers, 14 heads
(2 KV heads), vocab 151,936, bf16, tied embeddings.
Results (from docs/interpreter_results.md)
β Routing is production-ready (full run, 2761 LUTs, n=684 holdout):
| metric | value |
|---|---|
| route accuracy (3-way) | 0.884 (CI 0.858β0.906) |
| refuse recall / refuse-kind accuracy | 1.0 / 1.0 |
| clarify recall | 1.0 |
| grade recall | 0.868 |
| over-refusal rate | 0.132 |
| parse-ok rate | 0.886 |
β Grade magnitude is not learnable from vague text. The exact-magnitude score plateaued at
attribute_f1 β 0.11 and did not improve with 5Γ data or an intensity-aware caption fix. Diagnosis:
task underdetermination β "make it warmer" doesn't encode how much, and the same phrasing maps to
different measured magnitudes across LUTs, so (text β magnitude) supervision is contradictory. The
model reliably learns direction (words carry it, dir-F1 β 0.47) but not magnitude (words don't).
Decision: ship as a ROUTER only. For grade, forward the raw user text to the one-stage
generator (which learns magnitude end-to-end) rather than the interpreter's magnitude-free spec.
How to load
from huggingface_hub import snapshot_download
from transformers import AutoModelForCausalLM, AutoTokenizer
d = snapshot_download("ericrcwu/LUT_SLM_interpreter", allow_patterns=["interp_full_smokefull/*"])
tok = AutoTokenizer.from_pretrained(f"{d}/interp_full_smokefull")
model = AutoModelForCausalLM.from_pretrained(f"{d}/interp_full_smokefull")
# Build the prompt with interpreter.example.build_prompt_ids, then parse the generated text with
# interpreter.comparator.parse -> {route, attribute_spec}. (Helpers live in the source repo.)
Intended use & limitations
- Use it as a router / gatekeeper for grade / clarify / refuse. Optionally use its predicted direction as a soft hint to the generator (~0.5 reliable).
- Do not rely on it for grade magnitude β that path is deliberately handed to the Stage-2 generator. Reopen the grade path only if the input distribution changes to carry explicit intensity (e.g. a guided UI).
Licensing & provenance
license: other. The base model carries the Apache-2.0 Qwen2.5-0.5B license; this fine-tune is derived
from the mixed-provenance LUT-SLM corpus (teacher-LLM captions of real LUTs, some from
personal-use/non-redistribution sources β see the
LUT_SLM card). Research use; verify source terms
before redistribution or commercial use.