Kernels

Run this model with HF Jobs

Run replicate/megablocks on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/replicate/megablocks. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/replicate/megablocks on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
drbh commited on
Commit
2595c46
·
0 Parent(s):

feat: initial port of megablocks to builder format

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
73 files changed +6378
Files changed (50)
.gitattributesAdded+35
.gitignoreAdded+5
README.mdAdded+6
build.tomlAdded+30
csrc/bak.ops.cuAdded+21
csrc/cuda_util.hAdded+62
csrc/cumsum.hAdded+163
csrc/histogram.hAdded+86
csrc/indices.hAdded+95
csrc/new_cumsum.cuAdded+161
csrc/new_cumsum.hAdded+11
csrc/new_histogram.cuAdded+85
csrc/new_histogram.hAdded+10
csrc/new_indices.cuAdded+97
csrc/new_indices.hAdded+14
csrc/new_replicate.cuAdded+210
csrc/new_replicate.hAdded+17
csrc/new_sort.cuAdded+90
csrc/new_sort.hAdded+13
csrc/replicate.hAdded+211
csrc/sort.hAdded+91
flake.lockAdded+164
flake.nixAdded+18
tests/__init__.pyAdded
Empty file
tests/test_mb_moe.pyAdded+6
torch-ext/megablocks/__init__.pyAdded+191
torch-ext/megablocks/_version.pyAdded+6
torch-ext/megablocks/backend/__init__.pyAdded+2
torch-ext/megablocks/backend/kernels.pyAdded+543
torch-ext/megablocks/bak.__init__.pyAdded+23
torch-ext/megablocks/benchmark_util.pyAdded+35
torch-ext/megablocks/grouped_gemm_util.pyAdded+26
torch-ext/megablocks/layers/__init__.pyAdded+10
torch-ext/megablocks/layers/activation_fn.pyAdded+33
torch-ext/megablocks/layers/all_to_all.pyAdded+54
torch-ext/megablocks/layers/arguments.pyAdded+100
torch-ext/megablocks/layers/common.pyAdded+26
torch-ext/megablocks/layers/dmlp_registry.pyAdded+42
torch-ext/megablocks/layers/dmoe.pyAdded+327
torch-ext/megablocks/layers/gelu.pyAdded+43
torch-ext/megablocks/layers/glu.pyAdded+223
torch-ext/megablocks/layers/memory_test.pyAdded+102
torch-ext/megablocks/layers/memory_test.shAdded+12
torch-ext/megablocks/layers/mlp.pyAdded+574
torch-ext/megablocks/layers/moe.pyAdded+475
torch-ext/megablocks/layers/mpu.pyAdded+93
torch-ext/megablocks/layers/router.pyAdded+114
torch-ext/megablocks/layers/sharedexpert_registry.pyAdded+30
torch-ext/megablocks/ops/__init__.pyAdded+35
torch-ext/megablocks/ops/all_to_all_benchmark.pyAdded+60