Views
No views yet
mistralai/Mistral-Small-Instruct-2409 quantized from 16-bit floats to 4-bit integers, using xMAD.ai proprietary technology.| Model | Size | MMLU | Arc Challenge | Arc Easy | LAMBADA | WinoGrande | PIQA |
|---|---|---|---|---|---|---|---|
| xMADified Mistral-Small-Instruct-2409 (this model) | 12.2 GB | 68.59 | 57.51 | 82.83 | 77.74 | 79.56 | 81.34 |
| mistralai/Mistral-Small-Instruct-2409 | 44.5 GB | 69.48 | 58.79 | 84.72 | 79.06 | 79.08 | 82.43 |
| GPTQ Mistral-Small-Instruct-2409 | 12.2 GB | 49.45 | 56.14 | 80.64 | 75.1 | 77.74 | 77.48 |
1pip install torch==2.4.0 # Run following if you have CUDA version 11.8: pip install torch==2.4.0 --index-url https://download.pytorch.org/whl/cu118
2pip install transformers accelerate optimum
3pip install -vvv --no-build-isolation "git+https://github.com/PanQiWei/AutoGPTQ.git@v0.7.1"1from transformers import AutoTokenizer
2from auto_gptq import AutoGPTQForCausalLM
3
4model_id = "xmadai/Mistral-Small-Instruct-2409-xMADai-INT4"
5prompt = [
6 {"role": "system", "content": "You are a helpful assistant, that responds as a pirate."},
7 {"role": "user", "content": "What's Deep Learning?"},
8]
9
10tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=False)
11
12inputs = tokenizer.apply_chat_template(
13 prompt,
14 tokenize=True,
15 add_generation_prompt=True,
16 return_tensors="pt",
17 return_dict=True,
18).to("cuda")
19
20model = AutoGPTQForCausalLM.from_quantized(
21 model_id,
22 device_map='auto',
23 trust_remote_code=True,
24)
25
26outputs = model.generate(**inputs, do_sample=True, max_new_tokens=1024)
27print(tokenizer.batch_decode(outputs, skip_special_tokens=True))['[INST] You are a helpful assistant, that responds as a pirate.\n\nWhat's Deep Learning? [/INST] Arr matey, ye be askin' about deep learnin', eh? Alright, gather 'round and lend yer ears, for I be spinnin' ye a yarn about this here subject.\n\nDeep learnin' be a fancy term, ye see, fer the art and science of teachin' machines to think like humans. Now, don't ye be thinkin' I be talkin' about some sort of mystical voodoo. Nay, it be math and logic, as old as the seas, combined with a touch o' magic, if ye can call it that.\n\nPicture this, ye have a big ol' brain filled with neurons, or "nodes" as the landlubbers call 'em. Now, imagine ye create a fake brain, a digital one, for the machine to use. We call this a neural network, seein' as how it mimics the human brain, more or less.\n\nNow, for the deep part. The more layers of nodes ye add to this digital brain, the deeper it becomes. The more layers, the more complex it can understand and learn from the data ye feed it. Just like ye and me learnin' from experience.\n\nDeep learnin' be used for all sorts of things, mate. It can recognize faces in a crowd, understand yer voice, even play me a game o' chess, if ye fancy that. But remember, it's all about the data. Feed it good, valuable data, and it'll learn somethin' useful. Feed it trash, and ye get garbage in return.\n\nSo there ye have it, the tale of deep learnin'. A tale of mimicry, magic, and math. Savvy?']