Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

create bert models from cli

Michael Yangbeb49eef65ac
diff --git a/cmd/cmd.go b/cmd/cmd.go
index fd7246c8d..a8a02605c 100644
--- a/cmd/cmd.go
+++ b/cmd/cmd.go
@@ -223,6 +223,14 @@ func tempZipFiles(path string) (string, error) {
}
files = append(files, js...)
+ // bert models require a nested config.json
+ // TODO(mxyng): merge this with the glob above
+ js, err = glob(filepath.Join(path, "**/*.json"), "text/plain")
+ if err != nil {
+ return "", err
+ }
+ files = append(files, js...)
+
if tks, _ := glob(filepath.Join(path, "tokenizer.model"), "application/octet-stream"); len(tks) > 0 {
// add tokenizer.model if it exists, tokenizer.json is automatically picked up by the previous glob
// tokenizer.model might be a unresolved git lfs reference; error if it is
@@ -252,6 +260,11 @@ func tempZipFiles(path string) (string, error) {
return "", err
}
+ zfi.Name, err = filepath.Rel(path, file)
+ if err != nil {
+ return "", err
+ }
+
zf, err := zipfile.CreateHeader(zfi)
if err != nil {
return "", err