Quantization made by Richard Erkhov.
stablelm-3b-4e1t - GGUF
- Model creator: https://huggingface.co/stabilityai/
- Original model: https://huggingface.co/stabilityai/stablelm-3b-4e1t/
Name | Quant method | Size |
---|---|---|
stablelm-3b-4e1t.Q2_K.gguf | Q2_K | 1.01GB |
stablelm-3b-4e1t.IQ3_XS.gguf | IQ3_XS | 1.11GB |
stablelm-3b-4e1t.IQ3_S.gguf | IQ3_S | 1.17GB |
stablelm-3b-4e1t.Q3_K_S.gguf | Q3_K_S | 1.17GB |
stablelm-3b-4e1t.IQ3_M.gguf | IQ3_M | 1.23GB |
stablelm-3b-4e1t.Q3_K.gguf | Q3_K | 1.3GB |
stablelm-3b-4e1t.Q3_K_M.gguf | Q3_K_M | 1.3GB |
stablelm-3b-4e1t.Q3_K_L.gguf | Q3_K_L | 1.4GB |
stablelm-3b-4e1t.IQ4_XS.gguf | IQ4_XS | 1.43GB |
stablelm-3b-4e1t.Q4_0.gguf | Q4_0 | 1.5GB |
stablelm-3b-4e1t.IQ4_NL.gguf | IQ4_NL | 1.51GB |
stablelm-3b-4e1t.Q4_K_S.gguf | Q4_K_S | 1.51GB |
stablelm-3b-4e1t.Q4_K.gguf | Q4_K | 1.59GB |
stablelm-3b-4e1t.Q4_K_M.gguf | Q4_K_M | 1.59GB |
stablelm-3b-4e1t.Q4_1.gguf | Q4_1 | 1.65GB |
stablelm-3b-4e1t.Q5_0.gguf | Q5_0 | 1.81GB |
stablelm-3b-4e1t.Q5_K_S.gguf | Q5_K_S | 1.81GB |
stablelm-3b-4e1t.Q5_K.gguf | Q5_K | 1.86GB |
stablelm-3b-4e1t.Q5_K_M.gguf | Q5_K_M | 1.86GB |
stablelm-3b-4e1t.Q5_1.gguf | Q5_1 | 1.96GB |
stablelm-3b-4e1t.Q6_K.gguf | Q6_K | 2.14GB |
stablelm-3b-4e1t.Q8_0.gguf | Q8_0 | 2.77GB |
Original model description:
language: - en license: cc-by-sa-4.0 tags: - causal-lm datasets: - tiiuae/falcon-refinedweb - togethercomputer/RedPajama-Data-1T - CarperAI/pilev2-dev - bigcode/starcoderdata - allenai/peS2o model-index: - name: stablelm-3b-4e1t results: - task: type: text-generation name: Text Generation dataset: name: AI2 Reasoning Challenge (25-Shot) type: ai2_arc config: ARC-Challenge split: test args: num_few_shot: 25 metrics: - type: acc_norm value: 46.59 name: normalized accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=stabilityai/stablelm-3b-4e1t name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: HellaSwag (10-Shot) type: hellaswag split: validation args: num_few_shot: 10 metrics: - type: acc_norm value: 75.94 name: normalized accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=stabilityai/stablelm-3b-4e1t name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: MMLU (5-Shot) type: cais/mmlu config: all split: test args: num_few_shot: 5 metrics: - type: acc value: 45.23 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=stabilityai/stablelm-3b-4e1t name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: TruthfulQA (0-shot) type: truthful_qa config: multiple_choice split: validation args: num_few_shot: 0 metrics: - type: mc2 value: 37.2 source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=stabilityai/stablelm-3b-4e1t name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: Winogrande (5-shot) type: winogrande config: winogrande_xl split: validation args: num_few_shot: 5 metrics: - type: acc value: 71.19 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=stabilityai/stablelm-3b-4e1t name: Open LLM Leaderboard - task: type: text-generation name: Text Generation dataset: name: GSM8k (5-shot) type: gsm8k config: main split: test args: num_few_shot: 5 metrics: - type: acc value: 3.34 name: accuracy source: url: https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard?query=stabilityai/stablelm-3b-4e1t name: Open LLM Leaderboard
StableLM-3B-4E1T
Model Description
StableLM-3B-4E1T
is a 3 billion parameter decoder-only language model pre-trained on 1 trillion tokens of diverse English and code datasets for 4 epochs.
Usage
Get started generating text with StableLM-3B-4E1T
by using the following code snippet:
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-3b-4e1t")
model = AutoModelForCausalLM.from_pretrained(
"stabilityai/stablelm-3b-4e1t",
torch_dtype="auto",
)
model.cuda()
inputs = tokenizer("The weather is always wonderful", return_tensors="pt").to(model.device)
tokens = model.generate(
**inputs,
max_new_tokens=64,
temperature=0.75,
top_p=0.95,
do_sample=True,
)
print(tokenizer.decode(tokens[0], skip_special_tokens=True))
Run with Flash Attention 2 ⚡️
Click to expand
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("stabilityai/stablelm-3b-4e1t")
model = AutoModelForCausalLM.from_pretrained(
"stabilityai/stablelm-3b-4e1t",
torch_dtype="auto",
attn_implementation="flash_attention_2",
)
model.cuda()
inputs = tokenizer("The weather is always wonderful", return_tensors="pt").to(model.device)
tokens = model.generate(
**inputs,
max_new_tokens=64,
temperature=0.75,
top_p=0.95,
do_sample=True,
)
print(tokenizer.decode(tokens[0], skip_special_tokens=True))
Model Details
- Developed by: Stability AI
- Model type:
StableLM-3B-4E1T
models are auto-regressive language models based on the transformer decoder architecture. - Language(s): English
- Library: GPT-NeoX
- License: Model checkpoints are licensed under the Creative Commons license (CC BY-SA-4.0). Under this license, you must give credit to Stability AI, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the Stability AI endorses you or your use.
- Contact: For questions and comments about the model, please email
[email protected]
Model Architecture
The model is a decoder-only transformer similar to the LLaMA (Touvron et al., 2023) architecture with the following modifications:
Parameters | Hidden Size | Layers | Heads | Sequence Length |
---|---|---|---|---|
2,795,443,200 | 2560 | 32 | 32 | 4096 |
- Position Embeddings: Rotary Position Embeddings (Su et al., 2021) applied to the first 25% of head embedding dimensions for improved throughput following Black et al. (2022).
- Normalization: LayerNorm (Ba et al., 2016) with learned bias terms as opposed to RMSNorm (Zhang & Sennrich, 2019).
- Tokenizer: GPT-NeoX (Black et al., 2022).
Training
For complete dataset and training details, please see the StableLM-3B-4E1T Technical Report.
Training Dataset
The dataset is comprised of a filtered mixture of open-source large-scale datasets available on the HuggingFace Hub: Falcon RefinedWeb extract (Penedo et al., 2023), RedPajama-Data (Together Computer., 2023) and The Pile (Gao et al., 2020) both without the Books3 subset, and StarCoder (Li et al., 2023).
- Given the large amount of web data, we recommend fine-tuning the base StableLM-3B-4E1T for your downstream tasks.
Training Procedure
The model is pre-trained on the aforementioned datasets in bfloat16
precision, optimized with AdamW, and trained using the NeoX tokenizer with a vocabulary size of 50,257. We outline the complete hyperparameters choices in the project's GitHub repository - config.
Training Infrastructure
Hardware:
StableLM-3B-4E1T
was trained on the Stability AI cluster across 256 NVIDIA A100 40GB GPUs (AWS P4d instances). Training began on August 23, 2023, and took approximately 30 days to complete.Software: We use a fork of
gpt-neox
(EleutherAI, 2021), train under 2D parallelism (Data and Tensor Parallel) with ZeRO-1 (Rajbhandari et al., 2019), and rely on flash-attention as well as SwiGLU and Rotary Embedding kernels from FlashAttention-2 (Dao et al., 2023)
Use and Limitations
Intended Use
The model is intended to be used as a foundational base model for application-specific fine-tuning. Developers must evaluate and fine-tune the model for safe performance in downstream applications.
Limitations and Bias
As a base model, this model may exhibit unreliable, unsafe, or other undesirable behaviors that must be corrected through evaluation and fine-tuning prior to deployment. The pre-training dataset may have contained offensive or inappropriate content, even after applying data cleansing filters, which can be reflected in the model-generated text. We recommend that users exercise caution when using these models in production systems. Do not use the models if they are unsuitable for your application, or for any applications that may cause deliberate or unintentional harm to others.
How to Cite
@misc{StableLM-3B-4E1T,
url={[https://huggingface.co/stabilityai/stablelm-3b-4e1t](https://huggingface.co/stabilityai/stablelm-3b-4e1t)},
title={StableLM 3B 4E1T},
author={Tow, Jonathan and Bellagente, Marco and Mahan, Dakota and Riquelme, Carlos}
}
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
Metric | Value |
---|---|
Avg. | 46.58 |
AI2 Reasoning Challenge (25-Shot) | 46.59 |
HellaSwag (10-Shot) | 75.94 |
MMLU (5-Shot) | 45.23 |
TruthfulQA (0-shot) | 37.20 |
Winogrande (5-shot) | 71.19 |
GSM8k (5-shot) | 3.34 |