Downloads · 30 days
0
RichardErkhov/mbahrsnc_-_mini-mcqueen-exl2
mbahrsnc_-_mini-mcqueen-exl2 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
0
Access
Public
Updated Jan 18, 2025
Repo size
4.1 GB
Likes
0
Public
Click a slice to open those files.
.json1.2 MB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
mini-mcqueen - EXL2
| Branch | Bits | Description | | ----- | ---- | ------- | ------ | ------ | ------ | ------ | ------------ | | 8_0 | 8.0 | Maximum quality that ExLlamaV2 can produce, near unquantized performance. | | 6_5 | 6.5 | Very similar to 8.0, good tradeoff of size vs performance, recommended. | | 5_0 | 5.0 | Slightly lower quality vs 6.5, but usable on 8GB cards. | | 4_25 | 4.25 | GPTQ equivalent bits per weight, slightly higher quality. | | 3_5 | 3.5 | Lower quality, only use if you have to. |
With git:
git clone --single-branch --branch 6_5 https://huggingface.co/mbahrsnc_-_mini-mcqueen-exl2 mini-mcqueen-6_5
With huggingface hub:
pip3 install huggingface-hub
To download a specific branch, use the --revision parameter. For example, to download the 6.5 bpw branch:
Linux:
huggingface-cli download mbahrsnc_-_mini-mcqueen-exl2 --revision 6_5 --local-dir mini-mcqueen-6_5 --local-dir-use-symlinks False
Windows (which apparently doesn't like _ in folders sometimes?):
huggingface-cli download mbahrsnc_-_mini-mcqueen-exl2 --revision 6_5 --local-dir mini-mcqueen-6.5 --local-dir-use-symlinks False
base_model:
mini-mcqueen is a merge of the following models using LazyMergekit:
slices:
- sources:
- model: cognitivecomputations/TinyDolphin-2.8-1.1b
layer_range: [0, 21]
output_weight: 0.4
- model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
layer_range: [0, 21]
output_weight: 0.6
merge_method: slerp
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
parameters:
t:
- filter: self_attn
value: [0, 0.75, 0.5, 0.85, 1]
- filter: mlp
value: [1, 0.75, 0.85, 0.5, 0.25]
- value: 0.75
dtype: bfloat16
!pip install -qU transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "mbahrsnc/mini-mcqueen"
messages = [{"role": "user", "content": "What is a large language model?"}]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])