Skip to content

Commit

Permalink
refactor: support ollama modelfile usage estimate
Browse files Browse the repository at this point in the history
Signed-off-by: thxCode <[email protected]>
  • Loading branch information
thxCode committed Jul 5, 2024
1 parent f10cb8c commit ab75c5a
Show file tree
Hide file tree
Showing 19 changed files with 977 additions and 282 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ gguf-parser:
[[ -d "$(SRCDIR)/.dist" ]] || mkdir -p "$(SRCDIR)/.dist"

cd "$(SRCDIR)/cmd/gguf-parser" && for os in darwin linux windows; do \
tags="netgo"; \
if [[ $$os == "windows" ]]; then \
suffix=".exe"; \
tags="netcgo"; \
else \
suffix=""; \
fi; \
Expand All @@ -80,7 +82,7 @@ gguf-parser:
GOOS="$$os" GOARCH="$$arch" CGO_ENABLED=1 go build \
-trimpath \
-ldflags="-w -s -X main.Version=$(VERSION)" \
-tags="netgo" \
-tags="$$tags" \
-o $(SRCDIR)/.dist/gguf-parser-$$os-$$arch$$suffix; \
done; \
if [[ $$os == "darwin" ]]; then \
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@ go get github.com/thxcode/gguf-parser-go

```

You can also use the command-line package.

```shell
go install github.com/thxcode/gguf-parser-go/cmd/gguf-parser

```
If you need one-shot command-line, try [gguf-parser](./cmd/gguf-parser) please.

## Examples

Expand Down
140 changes: 82 additions & 58 deletions cmd/gguf-parser/README.md

Large diffs are not rendered by default.

Loading

0 comments on commit ab75c5a

Please sign in to comment.