AQIT 0.1.0
Loading...
Searching...
No Matches
model_loader.py File Reference

Go to the source code of this file.

Classes

class  aquin.compute.model_loader.ComputeNotAvailableError

Namespaces

namespace  aquin
namespace  aquin.compute
namespace  aquin.compute.model_loader

Functions

None aquin.compute.model_loader.clear_sae_cache ()
None aquin.compute.model_loader.evict_sae_cache (str model_id, int|None layer=None)
None aquin.compute.model_loader._save_active_model (str model_id)
str|None aquin.compute.model_loader.get_active_model_id (*, bool allow_daemon=True)
None aquin.compute.model_loader.reload_vram_for_model (str model_id)
None aquin.compute.model_loader.clear_active_model_file ()
None aquin.compute.model_loader.clear_llm_models ()
str|None aquin.compute.model_loader.get_loaded_llm_id ()
str aquin.compute.model_loader.resolve_model_id (str model_id)
dict aquin.compute.model_loader.get_config (str model_id)
str aquin.compute.model_loader.get_hf_name (str model_id)
int aquin.compute.model_loader.get_sae_layer (str model_id)
int|None aquin.compute.model_loader._layer_from_sae_filename (Path path)
bool aquin.compute.model_loader._is_loadable_sae_file (Path path)
str|None aquin.compute.model_loader.corrupt_sae_checkpoint_hint (str model_id, int layer)
Any aquin.compute.model_loader.load_sae_from_disk (str model_id, int layer, *, str|None device=None)
Path|None aquin.compute.model_loader.resolve_sae_checkpoint_path (str model_id, int layer)
list[int] aquin.compute.model_loader.get_available_sae_layers (str model_id)
list[int] aquin.compute.model_loader.get_catalog_sae_layers (str model_id)
str aquin.compute.model_loader.format_sae_layer_choice_message (str model_id, *, str command, str layer_flag="--layer", str example_suffix="", int|None requested_layer=None)
int aquin.compute.model_loader.require_sae_layer (str model_id, int|None layer, *, str command="trace", str example_suffix="")
Path aquin.compute.model_loader.resolve_sae_path (str model_id, int|None layer=None)
list[str] aquin.compute.model_loader.get_lora_target_modules (str model_id)
list[str] aquin.compute.model_loader.infer_lora_target_modules (Any model)
str aquin.compute.model_loader.get_sae_source (str model_id)
Any|None aquin.compute.model_loader.get_loaded_model ()
bool aquin.compute.model_loader._tl_not_in_catalog (BaseException exc)
bool aquin.compute.model_loader._tl_conversion_failed (BaseException exc)
Any aquin.compute.model_loader._wrap_hf_causal_lm (str hf_name, dict[str, Any] cfg, Any hf_model, *, Any dtype, str device)
Any aquin.compute.model_loader._build_hooked_transformer (dict[str, Any] cfg, *, Any dtype, str device)
Any aquin.compute.model_loader.load_model (str model_id)
Any aquin.compute.model_loader._load_model_unlocked (str model_id)
Any aquin.compute.model_loader.load_sae (Any model, int layer, str model_id, Path|None sae_dir=None)

Variables

dict aquin.compute.model_loader.MODEL_CONFIGS
dict aquin.compute.model_loader._HF_TO_SHORT
int aquin.compute.model_loader.MAX_LOADED_MODELS = 1
OrderedDict aquin.compute.model_loader._models = OrderedDict()
 aquin.compute.model_loader._model_io_lock = threading.RLock()
dict aquin.compute.model_loader._sae_cache = {}
str aquin.compute.model_loader._ACTIVE_MODEL_PATH = Path.home() / ".aquin" / "active_model.txt"