Downloads · 30 days
361
10% of all-time downloads
RichardErkhov/HenryHHHH_-_DistilLlama-gguf
HenryHHHH_-_DistilLlama-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
361
10% of all-time downloads
All-time downloads
3.8K
Public
Repo size
1.1 GB
Likes
0
Public
Click a slice to open those files.
.gguf1.2 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
DistilLlama - GGUF
| Name | Quant method | Size |
|---|---|---|
| DistilLlama.Q2_K.gguf | Q2_K | 0.04GB |
| DistilLlama.IQ3_XS.gguf | IQ3_XS | 0.04GB |
| DistilLlama.IQ3_S.gguf | IQ3_S | 0.04GB |
| DistilLlama.Q3_K_S.gguf | Q3_K_S | 0.04GB |
| DistilLlama.IQ3_M.gguf | IQ3_M | 0.04GB |
| DistilLlama.Q3_K.gguf | Q3_K | 0.04GB |
| DistilLlama.Q3_K_M.gguf | Q3_K_M | 0.04GB |
| DistilLlama.Q3_K_L.gguf | Q3_K_L | 0.05GB |
| DistilLlama.IQ4_XS.gguf | IQ4_XS | 0.05GB |
| DistilLlama.Q4_0.gguf | Q4_0 | 0.05GB |
| DistilLlama.IQ4_NL.gguf | IQ4_NL | 0.05GB |
| DistilLlama.Q4_K_S.gguf | Q4_K_S | 0.05GB |
| DistilLlama.Q4_K.gguf | Q4_K | 0.05GB |
| DistilLlama.Q4_K_M.gguf | Q4_K_M | 0.05GB |
| DistilLlama.Q4_1.gguf | Q4_1 | 0.05GB |
| DistilLlama.Q5_0.gguf | Q5_0 | 0.06GB |
| DistilLlama.Q5_K_S.gguf | Q5_K_S | 0.06GB |
| DistilLlama.Q5_K.gguf | Q5_K | 0.06GB |
| DistilLlama.Q5_K_M.gguf | Q5_K_M | 0.06GB |
| DistilLlama.Q5_1.gguf | Q5_1 | 0.06GB |
| DistilLlama.Q6_K.gguf | Q6_K | 0.07GB |
| DistilLlama.Q8_0.gguf | Q8_0 | 0.09GB |
language: en tags:
This model is a distilled version of LLaMA 2, containing approximately 80 million parameters. It was trained using a mix of OpenWebText and WikiText Raw V1 datasets. Knowledge distillation was employed to transfer knowledge from a larger "teacher" model—Meta’s 7B LLaMA 2—to help this smaller model mimic the behavior of the teacher.
The architecture is based on LLaMA 2, with the following parameters:
| Parameter | Value |
|---|---|
| Hidden Dimension | 512 |
| Intermediate Dimension | 1536 |
| Max Positional Embeddings | 128 |
| Attention Heads | 8 |
| Transformer Layers | 16 |
During each training step, the input data ( X ) is fed to both the teacher and student models. The student model calculates output logits and loss with the true labels, while the teacher model only generates logits. The total loss combines task-specific loss and distillation loss:
def distillation_loss(student_logits, teacher_logits, temperature=2.0):
return F.kl_div(
F.log_softmax(student_logits / temperature, dim=-1),
F.softmax(teacher_logits / temperature, dim=-1),
reduction='batchmean'
) * (temperature ** 2)
# Loss Calculation
loss = (alpha * distill_loss) + ((1 - alpha) * task_loss)
The model’s performance is evaluated on 200 queries created in-house. For more details, visit the GitHub repository.
| Query | Keyword |
|---|---|
| The capital of France is | Paris |
| The author of To Kill a Mockingbird is | Harper Lee |
| The planet known as the Red Planet is | Mars |
| The smallest country in the world is | Vatican City |
| The Mona Lisa was painted by | Leonardo da Vinci |
| The tallest mountain in the world is | Mount Everest |
| The host country of the 2016 Summer Olympics | Brazil |
| The currency of Japan is | Yen |
| The "Father of Computers" is | Charles Babbage |
| The largest ocean on Earth is | Pacific Ocean |
Input: The capital of France is
Input: The tallest mountain in the world is
Cosine Similarity using Word Embeddings
Exact Match (EM)
ROUGE Score
| Model Name | Duration (s) | Emissions (kgCO₂e) | Avg. EM | Avg. Cosine Similarity | Avg. ROUGE Score |
|---|---|---|---|---|---|
| LLaMA-2-7B-HF | 18215.61 | 1.84e-01 | 0.715 | 0.7257 | 0.0821 |
| baby-llama-58m | 57.20 | 2.73e-06 | 0.025 | 0.6556 | 0.0097 |
| DistilLlama | 77.12 | 7.79e-04 | 0.02 | 0.6623 | 0.0115 |
Note: CodeCarbon was used to track carbon emission. Allocated 80GB memory, 32 cores, Intel(R) Xeon(R) Gold 6448H for the evaluation
@misc{timiryasov2023babyllamaknowledgedistillation, title={Baby Llama: knowledge distillation from an ensemble of teachers trained on a small dataset with no performance penalty}, author={Inar Timiryasov and Jean-Loup Tastet}, year={2023}, eprint={2308.02019}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2308.02019}, }
Note: The repository will be updated as training progresses. Last update 2024-10-23