8000 Add Dolly generation & Ollama comparison CLI, Gemma 4 fixes, and cross-platform MaxRSS reporting by janpfeifer · Pull Request #85 · gomlx/go-huggingface · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions examples/dolly/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# [Databricks Dolly 15k Dataset](https://huggingface.co/datasets/databricks/databricks-dolly-15k)

An open-source (CC-BY-SA-3.0) dataset of ~15,000 human-generated instruction-following records across diverse categories
(brainstorming, classification, closed QA, generation, information extraction, open QA, and summarization).

This package contains a pre-generated Go struct schema (`gen_schema.go`, generated via `//go:generate`) for reading the
Parquet dataset using `github.com/gomlx/go-huggingface/datasets`.

For more information see:

* https://pkg.go.dev/github.com/gomlx/go-huggingface/datasets : The `datasets` package documentation.
* https://huggingface.co/datasets/databricks/databricks-dolly-15k : The dataset page on HuggingFace Hub.

## `browse`

A small CLI in [`browse/`](./browse) that downloads (and caches) the dataset, prints sample records, and optionally
generates responses with a HuggingFace model using GoMLX's `ml/zoo/transformer/generate`:

```bash
# Browse example #3 (default -n=1):
go run ./examples/dolly/browse -ex=3

# Generate responses for 3 examples using a GoMLX model:
go run ./examples/dolly/browse -n=3 -model=google/gemma-4-E2B-it -prompt_tokens=1024 -gen_tokens=128

# Generate responses using a local Ollama server:
go run ./examples/dolly/browse -n=3 -ollama=gemma4:e2b-it-bf16

# Run both and compare generated outputs side-by-side:
go run ./examples/dolly/browse -n=3 -model=google/gemma-4-E2B-it -ollama=gemma4:e2b-it-bf16
```
Loading
0