Skip to content

Commit

Permalink
added suport llamafile extension
Browse files Browse the repository at this point in the history
  • Loading branch information
bodaay committed Oct 12, 2024
1 parent 2f14ce8 commit 10cb3aa
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
24 changes: 24 additions & 0 deletions BuildAll.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
#!/usr/bin/env bash

# Path to the main.go file
MAIN_GO="main.go"

# Check if main.go exists
if [[ ! -f "$MAIN_GO" ]]; then
echo "Error: $MAIN_GO does not exist."
exit 1
fi

# Extract the version using grep and sed
VERSION=$(grep '^const VERSION' "$MAIN_GO" | sed -E 's/.*= *"([^"]+)".*/\1/')

# Check if VERSION was found
if [[ -z "$VERSION" ]]; then
echo "Error: VERSION not found in $MAIN_GO."
exit 1
fi

# Write the version to the VERSION file
echo "$VERSION" > VERSION

echo "Version $VERSION has been written to the VERSION file."

rm output/*
# Build script for all platforms

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.9
1.4.0
3 changes: 2 additions & 1 deletion hfdownloader/hfdownloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ func processHFFolderTree(ModelPath string, IsDataset bool, SkipSHA bool, ModelDa
strings.Contains(filenameLowerCase, ".gguf") || // either *.gguf or *.gguf-split-{a, b, ...}
strings.HasSuffix(filenameLowerCase, ".safetensors") || strings.HasSuffix(filenameLowerCase, ".pt") || strings.HasSuffix(filenameLowerCase, ".meta") ||
strings.HasSuffix(filenameLowerCase, ".zip") || strings.HasSuffix(filenameLowerCase, ".z01") || strings.HasSuffix(filenameLowerCase, ".onnx") || strings.HasSuffix(filenameLowerCase, ".data") ||
strings.HasSuffix(filenameLowerCase, ".onnx_data") {
strings.HasSuffix(filenameLowerCase, ".onnx_data") ||
strings.HasSuffix(filenameLowerCase, ".llamafile") {
jsonFilesList[i].FilterSkip = true // we assume its skipped, unless below condition range match
for _, ff := range FilterBinFileString {
if strings.Contains(filenameLowerCase, ff) {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/spf13/cobra"
)

const VERSION = "1.3.9"
const VERSION = "1.4.0"

type Config struct {
NumConnections int `json:"num_connections"`
Expand Down

0 comments on commit 10cb3aa

Please sign in to comment.