Skip to main content

Crate infraqueue_language_model

Crate infraqueue_language_model 

Source

Structs§

CandleRunParams
Parameters for local Candle generation.
TrainExample
TrainParams
TrainResult

Functions§

build_chat_messages
Build OpenAI-compatible chat messages from optional system and required user strings.
build_fallback_prompt
Build a combined prompt string as a fallback for backends that expect a single prompt. If sys is empty, returns user as-is; otherwise formats as system+user sections.
generate_local_candle
Run a minimal local Candle generation using HF Hub llama-family checkpoints. Returns the generated assistant text (without the prompt).
preload_local_candle
Optionally preload the model so the first request is fast.
train_logit_bias
Train a persistent global logit-bias adapter from prompt/assistant examples. This does not modify base model weights; instead it learns a bias vector (size=vocab) that is added to the logits during generation. The bias is saved to ADAPTER_DIR and automatically loaded on startup and applied for all subsequent generations.