add fixes for llama

This commit is contained in:
Patrick Devine
2024-05-08 16:07:46 -07:00
committed by Michael Yang
parent c8cf0d94ed
commit d355d2020f
5 changed files with 55 additions and 24 deletions

View File

@@ -74,11 +74,9 @@ func GetModelFormat(dirname string) (ModelFormat, error) {
}
for _, fn := range files {
slog.Debug(fmt.Sprintf("file = %s", fn))
if strings.HasSuffix(fn, ".safetensors") {
return &SafetensorFormat{}, nil
//} else if strings.HasSuffix(fn, ".bin") {
} else if strings.HasSuffix(fn, ".pth") {
} else if strings.HasSuffix(fn, ".bin") || strings.HasSuffix(fn, ".pth") {
slog.Debug("model is torch")
return &TorchFormat{}, nil
}