File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ class AC_LLAMA_EXPORT Model {
2424 bool gpu = true ; // try to load data on gpu
2525 bool vocabOnly = false ; // do not load model, only vocab
2626 bool prefixInputsWithBos = false ; // add bos token to interactive inputs (#13)
27+
28+ bool operator ==(const Params& other) const noexcept {
29+ return gpu == other.gpu
30+ && vocabOnly == other.vocabOnly
31+ && prefixInputsWithBos == other.prefixInputsWithBos ;
32+ }
2733 };
2834
2935 Model (std::shared_ptr<llama_model> model, Params params);
@@ -78,9 +84,7 @@ class AC_LLAMA_EXPORT ModelRegistry {
7884
7985 bool operator ==(const ModelKey& other) const noexcept {
8086 return gguf == other.gguf
81- && params.gpu == other.params .gpu
82- && params.prefixInputsWithBos == other.params .prefixInputsWithBos
83- && params.vocabOnly == other.params .vocabOnly ;
87+ && params == other.params ;
8488 }
8589 };
8690
You can’t perform that action at this time.
0 commit comments