TH
TheBloke/Mistral-7B-Instruct-v0.2-GGUF
text-generationtransformersapache-2.07B params · updated Dec 2023
Usage
usage.pytemplate from repo id
from osai import AutoModelForCausalLM, AutoTokenizer
repo = "TheBloke/Mistral-7B-Instruct-v0.2-GGUF"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(
repo, dtype="bfloat16", device_map="auto",
)
msgs = [{"role": "user", "content": "Explain speculative decoding."}]
ids = tok.apply_chat_template(msgs, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=256)[0]))Hardware
Computed from 7.00B parameters × bytes per parameter, plus 20% for activations and KV cache. Not measured.
| Precision | Weights | Estimated VRAM | Fits on |
|---|---|---|---|
| bf16 | 13.0 GB | 16 GB | L4 24 GB |
| int8 | 6.5 GB | 7.8 GB | CPU or T4 16 GB |
| nf4 | 3.3 GB | 3.9 GB | CPU or T4 16 GB |