152 const char*
v = std::getenv(
"ENTROPIC_SKIP_LARGE_MODEL_TESTS");
153 return v !=
nullptr &&
v[0] ==
'1';
196 gpu_layers < 0 && host_expert_bytes == 0;
197 const bool exempt = !use_mlock
201 if (
exempt) {
return false; }
206 host_expert_bytes > 0 ? host_expert_bytes :
file_bytes;
237 const bool exempt = gpu_layers == 0
long budget
Max content bytes; <= 0 = unbounded.
Activate model on GPU (WARM → ACTIVE).
bool gpu_offload_refused(uint64_t file_bytes, int gpu_layers, uint64_t free_vram_bytes)
Whether a requested GPU offload provably cannot fit free VRAM.
@ optional
optional: every escape asks the host's path approver
int partial_gpu_layers_for(uint64_t file_bytes, uint64_t free_vram_bytes, int n_layers=30)
Layers to place on the GPU for an oversized model.
bool host_can_hold_warm_load(uint64_t file_bytes, uint64_t available_bytes, uint64_t headroom_bytes=1024ull *1024 *1024)
Whether the host can hold a model's WARM load.
constexpr uint64_t kMemlockUnlimited
Sentinel for an unlimited RLIMIT_MEMLOCK (gh#148).
constexpr uint64_t kLargeModelThresholdBytes
Size above which a model counts as "large" for the waiver below.
bool mlock_refused(bool use_mlock, uint64_t file_bytes, int gpu_layers, uint64_t memlock_limit_bytes, uint64_t host_expert_bytes=0)
Whether an explicit use_mlock would be fatal for this model.
constexpr uint64_t kPartialOffloadReserveBytes
VRAM held back for compute/graph buffers, which scale with ubatch and model internals rather than wit...
bool large_model_tests_waived(uint64_t file_bytes)
Whether an operator has explicitly waived one LARGE model's test.