1
0
Fork 0
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:
niansa 2023-05-19 02:40:57 +02:00
parent f279b31d5f
commit b5e10d1fa3

View file

@ -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);