|
--- |
|
base_model: ahxt/llama2_xs_460M_experimental |
|
datasets: |
|
- Redpajama |
|
inference: false |
|
language: |
|
- en |
|
metrics: |
|
- MMLU |
|
model_creator: ahxt |
|
model_name: llama2_xs_460M_experimental |
|
pipeline_tag: text-generation |
|
quantized_by: afrideva |
|
tags: |
|
- llama2 |
|
- llama-2 |
|
- llama |
|
- llama2 architecture |
|
- gguf |
|
- ggml |
|
- quantized |
|
- q2_k |
|
- q3_k_m |
|
- q4_k_m |
|
- q5_k_m |
|
- q6_k |
|
- q8_0 |
|
--- |
|
# ahxt/llama2_xs_460M_experimental-GGUF |
|
|
|
Quantized GGUF model files for [llama2_xs_460M_experimental](https://huggingface.co./ahxt/llama2_xs_460M_experimental) from [ahxt](https://huggingface.co./ahxt) |
|
|
|
|
|
| Name | Quant method | Size | |
|
| ---- | ---- | ---- | |
|
| [llama2_xs_460m_experimental.q2_k.gguf](https://huggingface.co./afrideva/llama2_xs_460M_experimental-GGUF/resolve/main/llama2_xs_460m_experimental.q2_k.gguf) | q2_k | 212.56 MB | |
|
| [llama2_xs_460m_experimental.q3_k_m.gguf](https://huggingface.co./afrideva/llama2_xs_460M_experimental-GGUF/resolve/main/llama2_xs_460m_experimental.q3_k_m.gguf) | q3_k_m | 238.87 MB | |
|
| [llama2_xs_460m_experimental.q4_k_m.gguf](https://huggingface.co./afrideva/llama2_xs_460M_experimental-GGUF/resolve/main/llama2_xs_460m_experimental.q4_k_m.gguf) | q4_k_m | 288.51 MB | |
|
| [llama2_xs_460m_experimental.q5_k_m.gguf](https://huggingface.co./afrideva/llama2_xs_460M_experimental-GGUF/resolve/main/llama2_xs_460m_experimental.q5_k_m.gguf) | q5_k_m | 333.29 MB | |
|
| [llama2_xs_460m_experimental.q6_k.gguf](https://huggingface.co./afrideva/llama2_xs_460M_experimental-GGUF/resolve/main/llama2_xs_460m_experimental.q6_k.gguf) | q6_k | 380.87 MB | |
|
| [llama2_xs_460m_experimental.q8_0.gguf](https://huggingface.co./afrideva/llama2_xs_460M_experimental-GGUF/resolve/main/llama2_xs_460m_experimental.q8_0.gguf) | q8_0 | 492.67 MB | |
|
|
|
|
|
|
|
## Original Model Card: |
|
# LLaMa Lite: Reduced-Scale, Experimental Versions of LLaMA and LLaMa 2 |
|
|
|
In this series of repos, we present an open-source reproduction of Meta AI's [LLaMA](https://ai.meta.com/blog/large-language-model-llama-meta-ai/) and [LLaMa 2](https://ai.meta.com/llama/) large language models. However, with significantly reduced model sizes, the experimental version of [llama1_s](https://huggingface.co./ahxt/llama1_s_1.8B_experimental) has 1.8B parameters, and the experimental version of [llama2_xs](https://huggingface.co./ahxt/llama2_xs_460M_experimental) has 460M parameters. ('s' stands for small, while 'xs' denotes extra small). |
|
|
|
|
|
## Dataset and Tokenization |
|
We train our models on part of [RedPajama](https://www.together.xyz/blog/redpajama) dataset. We use the [GPT2Tokenizer](https://huggingface.co./docs/transformers/v4.31.0/en/model_doc/gpt2#transformers.GPT2Tokenizer) to tokenize the text. |
|
|
|
|
|
### Using with HuggingFace Transformers |
|
The experimental checkpoints can be directly loaded by [Transformers](https://huggingface.co./transformers/) library. The following code snippet shows how to load the our experimental model and generate text with it. |
|
|
|
```python |
|
import torch |
|
from transformers import AutoTokenizer, AutoModelForCausalLM |
|
|
|
# model_path = 'ahxt/llama2_xs_460M_experimental' |
|
model_path = 'ahxt/llama1_s_1.8B_experimental' |
|
|
|
model = AutoModelForCausalLM.from_pretrained(model_path) |
|
tokenizer = AutoTokenizer.from_pretrained(model_path) |
|
model.eval() |
|
|
|
prompt = 'Q: What is the largest bird?\nA:' |
|
input_ids = tokenizer(prompt, return_tensors="pt").input_ids |
|
tokens = model.generate(input_ids, max_length=20) |
|
print( tokenizer.decode(tokens[0].tolist(), skip_special_tokens=True) ) |
|
# Q: What is the largest bird?\nA: The largest bird is the bald eagle. |
|
``` |
|
|
|
## Evaluation |
|
|
|
We evaluate our models on the MMLU task |
|
markdown table |
|
| Models | #parameters |zero-shot | 5-shot | |
|
| --- | --- | --- | --- | |
|
| llama | 7B | 28.46 | 35.05 | |
|
| openllama | 3B | 24.90 | 26.71 | |
|
|TinyLlama-1.1B-step-50K-105b | 1.1B | 19.00 | 26.53 | |
|
| llama2_xs_460M | 0.46B | 21.13 | 26.39 | |
|
|
|
|
|
|
|
|
|
## Contact |
|
This experimental version is developed by: |
|
[Xiaotian Han](https://ahxt.github.io/) from Texas A&M University. And these experimental verisons are for research only. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co./spaces/HuggingFaceH4/open_llm_leaderboard) |
|
Detailed results can be found [here](https://huggingface.co./datasets/open-llm-leaderboard/details_ahxt__llama2_xs_460M_experimental) |
|
|
|
| Metric | Value | |
|
|-----------------------|---------------------------| |
|
| Avg. | 26.65 | |
|
| ARC (25-shot) | 24.91 | |
|
| HellaSwag (10-shot) | 38.47 | |
|
| MMLU (5-shot) | 26.17 | |
|
| TruthfulQA (0-shot) | 41.59 | |
|
| Winogrande (5-shot) | 49.88 | |
|
| GSM8K (5-shot) | 0.0 | |
|
| DROP (3-shot) | 5.51 | |