afrideva's picture
Upload README.md with huggingface_hub
3d6a79e
---
base_model: mesolitica/malaysian-mistral-1.1B-4096
inference: false
language:
- ms
model_creator: mesolitica
model_name: malaysian-mistral-1.1B-4096
pipeline_tag: text-generation
quantized_by: afrideva
tags:
- gguf
- ggml
- quantized
- q2_k
- q3_k_m
- q4_k_m
- q5_k_m
- q6_k
- q8_0
---
# mesolitica/malaysian-mistral-1.1B-4096-GGUF
Quantized GGUF model files for [malaysian-mistral-1.1B-4096](https://huggingface.co/mesolitica/malaysian-mistral-1.1B-4096) from [mesolitica](https://huggingface.co/mesolitica)
| Name | Quant method | Size |
| ---- | ---- | ---- |
| [malaysian-mistral-1.1b-4096.fp16.gguf](https://huggingface.co/afrideva/malaysian-mistral-1.1B-4096-GGUF/resolve/main/malaysian-mistral-1.1b-4096.fp16.gguf) | fp16 | 2.25 GB |
| [malaysian-mistral-1.1b-4096.q2_k.gguf](https://huggingface.co/afrideva/malaysian-mistral-1.1B-4096-GGUF/resolve/main/malaysian-mistral-1.1b-4096.q2_k.gguf) | q2_k | 491.42 MB |
| [malaysian-mistral-1.1b-4096.q3_k_m.gguf](https://huggingface.co/afrideva/malaysian-mistral-1.1B-4096-GGUF/resolve/main/malaysian-mistral-1.1b-4096.q3_k_m.gguf) | q3_k_m | 561.96 MB |
| [malaysian-mistral-1.1b-4096.q4_k_m.gguf](https://huggingface.co/afrideva/malaysian-mistral-1.1B-4096-GGUF/resolve/main/malaysian-mistral-1.1b-4096.q4_k_m.gguf) | q4_k_m | 682.68 MB |
| [malaysian-mistral-1.1b-4096.q5_k_m.gguf](https://huggingface.co/afrideva/malaysian-mistral-1.1B-4096-GGUF/resolve/main/malaysian-mistral-1.1b-4096.q5_k_m.gguf) | q5_k_m | 799.13 MB |
| [malaysian-mistral-1.1b-4096.q6_k.gguf](https://huggingface.co/afrideva/malaysian-mistral-1.1B-4096-GGUF/resolve/main/malaysian-mistral-1.1b-4096.q6_k.gguf) | q6_k | 922.87 MB |
| [malaysian-mistral-1.1b-4096.q8_0.gguf](https://huggingface.co/afrideva/malaysian-mistral-1.1B-4096-GGUF/resolve/main/malaysian-mistral-1.1b-4096.q8_0.gguf) | q8_0 | 1.19 GB |
## Original Model Card:
# Pretrain 1.1B 4096 context length Mistral on Malaysian text
README at https://github.com/mesolitica/malaya/tree/5.1/pretrained-model/mistral
- Dataset gathered at https://github.com/malaysia-ai/dedup-text-dataset/tree/main/pretrain-llm
- We use Ray cluster to train on 5 nodes of 4x A100 80GB, https://github.com/malaysia-ai/jupyter-gpu/tree/main/ray
WandB, https://wandb.ai/mesolitica/pretrain-mistral-1.1b?workspace=user-husein-mesolitica
WandB report, https://wandb.ai/mesolitica/pretrain-mistral-3b/reports/Pretrain-Larger-Malaysian-Mistral--Vmlldzo2MDkyOTgz
## how-to
```python
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
import torch
TORCH_DTYPE = 'bfloat16'
nf4_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type='nf4',
bnb_4bit_use_double_quant=True,
bnb_4bit_compute_dtype=getattr(torch, TORCH_DTYPE)
)
tokenizer = AutoTokenizer.from_pretrained('mesolitica/malaysian-mistral-1.1B-4096', model_input_names = ['input_ids'])
model = AutoModelForCausalLM.from_pretrained(
'mesolitica/malaysian-mistral-1.1B-4096',
use_flash_attention_2 = True,
quantization_config = nf4_config
)
prompt = '<s>nama saya'
inputs = tokenizer([prompt], return_tensors='pt', add_special_tokens=False).to('cuda')
generate_kwargs = dict(
inputs,
max_new_tokens=512,
top_p=0.95,
top_k=50,
temperature=0.9,
do_sample=True,
num_beams=1,
repetition_penalty=1.05,
)
r = model.generate(**generate_kwargs)
```