Archived
core: runtime LoRA declare, startup adapters, model routing and a per-adapter prefix key
--lora NAME=PATH, --max-loras, --max-lora-rank, --lora-target-modules. Off unless named: no site, no pool, no op, and every prefix hash is what it was.
This commit is contained in:
1 parent
86cbc59063
commit
ba406ace1b
18 files changed
+684
-4
No files matched your search
@@ -0,0 +1,28 @@
|
||||
/* lora/declare.h -- the runtime-LoRA half of declare: after the architecture plugin has declared
|
||||
* its program, build the sites (lora.h), declare the adapter pools and the two ops each targeted
|
||||
* GEMM is followed by, and record what the issue path needs (Program::lora_sites).
|
||||
*
|
||||
* Runs inside rad_tools_declare, after rad_arch_declare and before the sampler, on the real
|
||||
* declare AND on every sizing declare -- identically, because a sizing declare must produce the
|
||||
* same op list (rad_builder.cpp checks it op by op). */
|
||||
#pragma once
|
||||
#include "lora/config.h"
|
||||
#include "lora/lora.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace rad {
|
||||
|
||||
class Builder;
|
||||
|
||||
struct LoraDeclare {
|
||||
const LoraConfig* cfg = nullptr;
|
||||
lora::TargetSet targets;
|
||||
/* The real declare's sites, for the adapter loader; null on a sizing declare. */
|
||||
std::vector<lora::Site>* sites_out = nullptr;
|
||||
};
|
||||
|
||||
/* RAD_OK, or a negative code after RAD_ERR lines naming every refusal. */
|
||||
int lora_declare(Builder& b, const LoraDeclare& d);
|
||||
|
||||
} /* namespace rad */
|
||||
Reference in new issue
Block a user