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

Add Dolly generation & Ollama comparison CLI, Gemma 4 fixes, and cross-platform MaxRSS reporting - #85

Merged
janpfeifer merged 14 commits into
mainfrom
demo-gen-ai
Nov 24, 2026
Merged

janpfeifer merged 14 commits into
mainfrom
demo-gen-ai

Conversation

@janpfeifer
Copy link
Copy Markdown
Contributor

Summary

Adds the Dolly-15k interactive/benchmark generation CLI with side-by-side Ollama comparison, completes Gemma 4 model support, and improves memory/backend reporting (companion to the compute and gomlx demo-gen-ai PRs):

  • Dolly-15k Dataset & Generation Benchmark CLI (examples/dolly):
    • Added examples/dolly dataset schema and examples/dolly/browse CLI for running autoregressive generation with GoMLX and comparing outputs/speed side-by-side against Ollama (internal/ollamaclient, -ollama, -ollama_host).
    • Added -ex, -n, -gen_tokens, -prompt_tokens, -donate_store, -mmap, -force_f32, and -cpuprof flags, plus per-example and warm summary reporting (CPUTime/tok, avg_cores, MaxRSS, skipping cold example More demos #1 from warm averages for both GoMLX and Ollama).
    • Displayed backend info at startup.
  • Gemma 4 Transformer Support (models/transformer):
    • Parsed and wired use_double_wide_mlp from config.json.
    • Fixed Gemma 4 proportional RoPE (WithPartialRotaryFactor) and attnLogitCap.
    • Capped LocalLayer KV-cache maximum length to SlidingWindow when configured.
    • Wired WithOnlyLastTokenLogits for faster prefill and finalized skipped unmapped tensors in LoadStoreFiltered.
  • Timestral Example (examples/timestral):
    • Switched examples/timestral/main.go to support.MaxRSS() for accurate cross-platform peak memory reporting (including macOS ri_lifetime_max_phys_footprint).

Verification

  • Added unit tests in internal/ollamaclient/ollamaclient_test.go.
  • Verified examples/dolly/browse on google/gemma-4-E2B-it (BFloat16) against Ollama (gemma4:e2b-it-bf16) and examples/timestral on mistralai/Timestral-123M on both Linux (amd64) and macOS (arm64).

@janpfeifer
janpfeifer merged commit 638784b into main Nov 24, 2026
5 checks passed
@janpfeifer
janpfeifer deleted the demo-gen-ai branch November 28, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0