mirror of
https://gitlab.com/niansa/libjustlm.git
synced 2025-03-06 20:49:17 +01:00
Use magic to identify llama models
This commit is contained in:
parent
f279b31d5f
commit
b5e10d1fa3
1 changed files with 5 additions and 1 deletions
|
@ -10,10 +10,14 @@
|
|||
|
||||
extern "C" {
|
||||
const LM::Implementation *get_justlm_implementation() {
|
||||
static LM::Implementation fres{true};
|
||||
static LM::Implementation fres{false};
|
||||
return &fres;
|
||||
}
|
||||
|
||||
bool magic_match(uint32_t magic) {
|
||||
return magic == 0x67676a74;
|
||||
}
|
||||
|
||||
LM::Inference *construct(const std::string &weights_path, std::ifstream& f, const LM::Inference::Params &p) {
|
||||
f.close();
|
||||
return new LM::LLaMaInference(weights_path, p);
|
||||
|
|
Loading…
Add table
Reference in a new issue