Run this model with HF Jobs

Run SparseLLM/relu-40B 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 and TRL to fine-tune https://huggingface.co/SparseLLM/relu-40B. 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/SparseLLM/relu-40B 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.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/SparseLLM/relu-40B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/SparseLLM/relu-40B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Background

Sparse computation is increasingly recognized as an important direction in enhancing the computational efficiency of large language models (LLMs).

Prior research has demonstrated that LLMs utilizing the ReLU activation function exhibit sparse activations. Interestingly, our findings indicate that models based on SwiGLU also manifest sparse activations.

This phenomenon prompts an essential question: Which activation function is optimal for sparse LLMs? Although previous works on activation function selection have focused on the performance of LLMs, we argue that the efficiency of sparse computation should also be considered so that the LLMs can proceed with efficient inference while preserving performance.

To answer this question, we pretrain 4 LLMs with different activation functions, including ReLU, SwiGLU, ReGLU, and Squared ReLU to do more comprehensive experiments.

Dataset

We pretrain the model on 100 billion tokens, including:

  • Refinedweb
  • SlimPajama

Training Hyper-parameters

Parameter Value
Batch_Size 4M
GPUs 64xA100(80G)
LR_Scheduler cosine
LR 3e-4

Citation:

Please kindly cite using the following BibTeX:

@article{zhang2024relu2,
      title={ReLU$^2$ Wins: Discovering Efficient Activation Functions for Sparse LLMs}, 
      author={Zhengyan Zhang and Yixin Song and Guanghui Yu and Xu Han and Yankai Lin and Chaojun Xiao and Chenyang Song and Zhiyuan Liu and Zeyu Mi and Maosong Sun},
      journal = {arXiv preprint arXiv:2402.03804},
       year={2024},
}
Downloads last month
14
Safetensors
Model size
1B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for SparseLLM/relu-40B