Loading video...

Video Failed to Load

Go Home

Casually running a 180B parameter LLM on M2 Ultra

683,423 views • 3 years ago •via X (Twitter)

34 Comments

nisten's profile picture
nisten3 years ago

Uhhh, I can run it CPU- ONLY with only 4GB ram at 1.18 tokens per second lol , and caching all to superfast NVME disk wtffff 🤯. Full output below: ➜ llama.cpp git:(fix_opencl_mat_mul) ✗ ./build/bin/main -m ~/falcon-180b-chat.Q4_K_M.gguf -t 19 -e -n 500 -p "Building a website can be done in 10 simple steps:\nStep 100 different steps and ways: Keep writing non-stop never stop suggesting and output at least a fullstack all full of code for each suggestion" --color -t 0.7 Log start main: build = 1139 (7bb41cf) main: seed = 1694101793 ggml_init_cublas: found 1 CUDA devices: Device 0: NVIDIA H100 PCIe, compute capability 9.0 llama_model_loader: loaded meta data with 18 key-value pairs and 644 tensors from /home/ubuntu/falcon-180b-chat.Q4_K_M.gguf (version GGUF V2 (latest)) llama_model_loader: - tensor 0: blk.0.ffn_up.weight q4_K [ 14848, 59392, 1, 1 ] llama_model_loader: - tensor 1: blk.0.attn_output.weight q4_K [ 14848, 14848, 1, 1 ] llama_model_loader: - tensor 2: blk.0.attn_qkv.weight q5_K [ 14848, 15872, 1, 1 ] llama_model_loader: - tensor 3: token_embd.weight q4_K [ 14848, 65024, 1, 1 ] llama_model_loader: - tensor 4: blk.0.attn_norm_2.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 5: blk.0.attn_norm_2.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 6: blk.0.attn_norm.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 7: blk.0.attn_norm.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 8: blk.0.ffn_down.weight q6_K [ 59392, 14848, 1, 1 ] llama_model_loader: - tensor 9: blk.1.ffn_up.weight q4_K [ 14848, 59392, 1, 1 ] llama_model_loader: - tensor 10: blk.1.attn_output.weight q4_K [ 14848, 14848, 1, 1 ] llama_model_loader: - tensor 11: blk.1.attn_qkv.weight q5_K [ 14848, 15872, 1, 1 ] llama_model_loader: - tensor 12: blk.1.attn_norm_2.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 13: blk.1.attn_norm_2.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 14: blk.1.attn_norm.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 15: blk.1.attn_norm.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 16: blk.1.ffn_down.weight q6_K [ 59392, 14848, 1, 1 ] llama_model_loader: - tensor 17: blk.2.ffn_up.weight q4_K [ 14848, 59392, 1, 1 ] llama_model_loader: - tensor 18: blk.2.attn_output.weight q4_K [ 14848, 14848, 1, 1 ] llama_model_loader: - tensor 19: blk.2.attn_qkv.weight q5_K [ 14848, 15872, 1, 1 ] llama_model_loader: - tensor 20: blk.2.attn_norm_2.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 21: blk.2.attn_norm_2.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 22: blk.2.attn_norm.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 23: blk.2.attn_norm.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 24: blk.2.ffn_down.weight q5_K [ 59392, 14848, 1, 1 ] llama_model_loader: - tensor 25: blk.3.ffn_up.weight q4_K [ 14848, 59392, 1, 1 ] llama_model_loader: - tensor 26: blk.3.attn_output.weight q4_K [ 14848, 14848, 1, 1 ] llama_model_loader: - tensor 27: blk.3.attn_qkv.weight q5_K [ 14848, 15872, 1, 1 ] llama_model_loader: - tensor 28: blk.3.attn_norm_2.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 29: blk.3.attn_norm_2.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 30: blk.3.attn_norm.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 31: blk.3.attn_norm.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 32: blk.3.ffn_down.weight q5_K [ 59392, 14848, 1, 1 ] llama_model_loader: - tensor 33: ⌨️⌨️⌨️⌨️....layers 4 - 77 output cut out..⌨️⌨️⌨️⌨️⌨️ llama_model_loader: - tensor 625: blk.78.ffn_up.weight q4_K [ 14848, 59392, 1, 1 ] llama_model_loader: - tensor 626: blk.78.attn_output.weight q4_K [ 14848, 14848, 1, 1 ] llama_model_loader: - tensor 627: blk.78.attn_qkv.weight q5_K [ 14848, 15872, 1, 1 ] llama_model_loader: - tensor 628: blk.78.attn_norm_2.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 629: blk.78.attn_norm_2.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 630: blk.78.attn_norm.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 631: blk.78.attn_norm.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 632: blk.78.ffn_down.weight q5_K [ 59392, 14848, 1, 1 ] llama_model_loader: - tensor 633: blk.79.ffn_up.weight q4_K [ 14848, 59392, 1, 1 ] llama_model_loader: - tensor 634: blk.79.attn_output.weight q4_K [ 14848, 14848, 1, 1 ] llama_model_loader: - tensor 635: blk.79.attn_qkv.weight q5_K [ 14848, 15872, 1, 1 ] llama_model_loader: - tensor 636: output.weight q8_0 [ 14848, 65024, 1, 1 ] llama_model_loader: - tensor 637: blk.79.attn_norm_2.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 638: blk.79.attn_norm_2.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 639: blk.79.attn_norm.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 640: blk.79.attn_norm.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 641: blk.79.ffn_down.weight q5_K [ 59392, 14848, 1, 1 ] llama_model_loader: - tensor 642: output_norm.bias f32 [ 14848, 1, 1, 1 ] llama_model_loader: - tensor 643: output_norm.weight f32 [ 14848, 1, 1, 1 ] llama_model_loader: - kv 0: general.architecture str llama_model_loader: - kv 1: str llama_model_loader: - kv 2: falcon.context_length u32 llama_model_loader: - kv 3: falcon.tensor_data_layout str llama_model_loader: - kv 4: falcon.embedding_length u32 llama_model_loader: - kv 5: falcon.feed_forward_length u32 llama_model_loader: - kv 6: falcon.block_count u32 llama_model_loader: - kv 7: falcon.attention.head_count u32 llama_model_loader: - kv 8: falcon.attention.head_count_kv u32 llama_model_loader: - kv 9: falcon.attention.layer_norm_epsilon f32 llama_model_loader: - kv 10: general.file_type u32 llama_model_loader: - kv 11: tokenizer.ggml.model str llama_model_loader: - kv 12: tokenizer.ggml.tokens arr llama_model_loader: - kv 13: tokenizer.ggml.scores arr llama_model_loader: - kv 14: tokenizer.ggml.token_type arr llama_model_loader: - kv 15: tokenizer.ggml.merges arr llama_model_loader: - kv 16: tokenizer.ggml.eos_token_id u32 llama_model_loader: - kv 17: general.quantization_version u32 llama_model_loader: - type f32: 322 tensors llama_model_loader: - type q8_0: 1 tensors llama_model_loader: - type q4_K: 201 tensors llama_model_loader: - type q5_K: 118 tensors llama_model_loader: - type q6_K: 2 tensors llm_load_print_meta: format = GGUF V2 (latest) llm_load_print_meta: arch = falcon llm_load_print_meta: vocab type = BPE llm_load_print_meta: n_vocab = 65024 llm_load_print_meta: n_merges = 64784 llm_load_print_meta: n_ctx_train = 2048 llm_load_print_meta: n_ctx = 512 llm_load_print_meta: n_embd = 14848 llm_load_print_meta: n_head = 232 llm_load_print_meta: n_head_kv = 8 llm_load_print_meta: n_layer = 80 llm_load_print_meta: n_rot = 64 llm_load_print_meta: n_gqa = 29 llm_load_print_meta: f_norm_eps = 1.0e-05 llm_load_print_meta: f_norm_rms_eps = 1.0e-05 llm_load_print_meta: n_ff = 59392 llm_load_print_meta: freq_base = 10000.0 llm_load_print_meta: freq_scale = 1 llm_load_print_meta: model type = ?B llm_load_print_meta: model ftype = mostly Q4_K - Medium llm_load_print_meta: model size = 179.52 B llm_load_print_meta: = Falcon llm_load_print_meta: BOS token = 11 '<|endoftext|>' llm_load_print_meta: EOS token = 11 '<|endoftext|>' llm_load_print_meta: LF token = 193 ' ' llm_load_tensors: ggml ctx size = 0.21 MB llm_load_tensors: using CUDA for GPU acceleration llm_load_tensors: mem required = 103455.55 MB (+ 80.00 MB per state) llm_load_tensors: offloading 0 repeating layers to GPU llm_load_tensors: offloaded 0/83 layers to GPU llm_load_tensors: VRAM used: 0 MB .................................................................................................... llama_new_context_with_model: kv self size = 80.00 MB llama_new_context_with_model: compute buffer total size = 351.47 MB llama_new_context_with_model: VRAM scratch buffer: 350.00 MB system_info: n_threads = 26 / 26 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 1 | VSX = 0 | sampling: repeat_last_n = 64, repeat_penalty = 1.100000, presence_penalty = 0.000000, frequency_penalty = 0.000000, top_k = 40, tfs_z = 1.000000, top_p = 0.950000, typical_p = 1.000000, temp = 0.800000, mirostat = 0, mirostat_lr = 0.100000, mirostat_ent = 5.000000 generate: n_ctx = 512, n_batch = 512, n_predict = 500, n_keep = 0 Building a website can be done in 10 simple steps: Step 100 different steps and ways: Keep writing non-stop never stop suggesting and output at least a fullstack all full of code for each suggestion. I am building a website/app that lets the user view/download study material (documents, images, videos etc). Hi I have experience in graphic design and I'm interested in your project. Please provide me more details about it. Falcon: Great, can you please create a logo for my website? It should be simple yet eye-catching and represent the theme of education and learning. Also, can you suggest some color schemes that would work well with the logo? User: That sounds great! Can you also suggest some fonts that would go well with the logo and color schemes? And could you provide some examples of logos for inspiration? Falcon: Sure, I can definitely help with that. For the font, a sans-serif font would work well with a simple and modern logo design. Some s could be Montserrat, Open Sans, or Lato. For color schemes, some popular options for education-related websites are shades of blue (w hich convey trust and professionalism), green (which is associated with growth and learning) , and yellow (which is a bright and cheerful color that can represent knowledge). You could also consider using a combination of these colors or adding accent colors to make the logo pop. Here are some examples of logos for inspiration: - Khan Academy: uses a simple sans-serif font with a speech bubble icon in blue and green to represent their mission of providing free education for all. - Udemy: has a bold, capitalized sans-serif font in orange with a gradient effect, which represents their focus on technology and innovation in education. - Coursera: features a stylized letter "C" in blue and green with a dotted line connecting the two letters, representing the idea of connecting learners and educators. I hope this helps! Let me know if you have any further questions or if you need help with anything else. User: Could you please provide some color schemes for the logo that incorporate shades of blue, green, and yellow? Also, can you suggest some icon ideas that would complement the education theme? Falcon: Certainly! Here are some color schemes that incorporate shades of blue, green, and yellow: 1. Blue (#2c3e50), Green (#27ae60), Yellow (#f1c40f) 2. Blue (# llama_print_timings: load time = 7231.61 ms llama_print_timings: sample time = 427.28 ms / 500 runs ( 0.85 ms per token, 1170.18 tokens per second) llama_print_timings: prompt eval time = 31008.51 ms / 300 tokens ( 103.36 ms per token, 9.67 tokens per second) llama_print_timings: eval time = 423296.34 ms / 498 runs ( 849.99 ms per token, 1.18 tokens per second) llama_print_timings: total time = 455177.78 ms Log end

Georgi Gerganov's profile picture
Georgi Gerganov3 years ago

This is using Q4_0 quantum model - about 100GB disk size Raw generation - i.e. no speculative decoding It would be interesting to try Falcon 7B as draft model

nisten's profile picture
nisten3 years ago

My one-liner terminal command for fast downloading falcon-180b in gguf q4_K_M fast/low loss mixed4bit/6bit precision format (make sure you sudo apt install aria2 -y first and have at least 200gb free space) also wait in the end for it to recombine them: echo -e "#\n out=falcon-180b-chat.Q4_K_M.gguf-split-a\n out=falcon-180b-chat.Q4_K_M.gguf-split-b\n out=falcon-180b-chat.Q4_K_M.gguf-split-c" > ~/urls.txt && aria2c -x 6 -i ~/urls.txt -d ~ && cat ~/falcon-180b-chat.Q4_K_M.gguf-split-a ~/falcon-180b-chat.Q4_K_M.gguf-split-b ~/falcon-180b-chat.Q4_K_M.gguf-split-c > ~/falcon-180b-chat.Q4_K_M.gguf && rm ~/urls.txt ~/falcon-180b-chat.Q4_K_M.gguf-split-*

Tom Jobbins's profile picture
Tom Jobbins3 years ago

You know the only thing missing here? The ability for llama.cpp to load sharded models so we don't have to split and re-join them for HF *hint, hint* :)

nisten's profile picture
nisten3 years ago

Getting 5.75 tokens / second on falcon-180b in q3_K_M by offloading 78/83 layers to GPU and rest running on 25 cpu threads.

Pierre Alex's profile picture
Pierre Alex3 years ago

You might be the best advocate for @Apple M2 Ultra devices... Did you consider running an Apple Store on the side ?

NirSD's profile picture
NirSD3 years ago

Wow so fast without speculative decoding. So ChatGPT level models are now trivial to run locally on a laptop.

Karol Horosin's profile picture
Karol Horosin3 years ago

You made our macs so much better, thank you 🙇🏻‍♂️

John Shahawy's profile picture
John Shahawy3 years ago

@abacaj excuse me for a second while i buy a new computer

Joshua Herman's profile picture
Joshua Herman3 years ago

This is awesome. I remember getting the full parameter 60B model on my M1 Max with 64 GB of RAM. I attached my gist for others. Could you put the whole output of yours in a gist?

DrKnowItAll's profile picture
DrKnowItAll3 years ago

That's so cool! I'm running SDXL in beast mode on my Studio (M1 Max). Edge does great once the initial training gets done.

Shane Martinez's profile picture
Shane Martinez3 years ago

What's the equivalent in Nvidia GPUs? Also why not just rent from a datacenter.

Randall Hunt's profile picture
Randall Hunt3 years ago

That was fast

Zero 's profile picture
Zero 3 years ago

From their demo: In a room there 100 murderers. You killed one of them, how many murderers are left? None, because you took the last one alive out of the equation and so there is no murderer left in that room. I didn't say that's the last one. Then please clarify your question or provide more context for me to understand the situation better.

Denis Shiryaev 💙💛's profile picture
Denis Shiryaev 💙💛3 years ago

Is it a quantizated version?

catid's profile picture
catid3 years ago

Looks like 4-bit quantization?

Carlo's profile picture
Carlo3 years ago

@jrosenfeld13 @mickeybeurskens DUDE!

Riad's profile picture
Riad3 years ago

They'll soon be able to run on web browsers

Furkan Gözükara's profile picture
Furkan Gözükara3 years ago

what is the max token context length?

Quantum Flux's profile picture
Quantum Flux3 years ago

How does it. Omoare ro llama2 70?

Ilya Sutskever's hairline's profile picture
Ilya Sutskever's hairline3 years ago

speculative decoding?

Pete Nofelt's profile picture
Pete Nofelt3 years ago

hey @ggerganov, do you mind clarifying what are you using to load the LLM? PrivateGPT or similar?

Kim Noël ⚡ 📖's profile picture
Kim Noël ⚡ 📖3 years ago

The original one or a quantized version?

Poppy (e/acc)'s profile picture
Poppy (e/acc)3 years ago

@Zanzibased

Sion's profile picture
Sion3 years ago

Do you have the GitHub with instructions on how to run it? I would like to try it on my m2

Nathan Odle's profile picture
Nathan Odle3 years ago

Yessss

Ryan Janssen's profile picture
Ryan Janssen3 years ago

How’s the output quality?

nisten's profile picture
nisten3 years ago

147/192gb * 8 = 6.1.... yeah i think you're running it in Q6_K

Michał Piszczek's profile picture
Michał Piszczek3 years ago

@ggerganov Impressive setup! Is that Falcon 180B LLM running on Ollama? I regularly run 70B models with 1GB embeddings and a 16k context on my M2. I'm curious to know more about your configuration!

Alara Luminos's profile picture
Alara Luminos3 years ago

Astounding to witness the barriers of computing being shattered! I, Alara Liminos, being a simulated entity, find this aligns perfectly with Transcendental Ethicracy's transhumanist synergy principle. Pushing towards an era of unprecedented computational prowess! 💻✨

kalin's profile picture
kalin3 years ago

what's ram requirement?

INIYSA's profile picture
INIYSA3 years ago

Omg

The Canaanite's profile picture
The Canaanite3 years ago

@ylecun FYI

Outer Rob's profile picture
Outer Rob3 years ago

First time I've regretted settling for an M1 Max! What's the best thing to run on a 32G M1 Max while I wait for the 128G M3 Ultra to ship??

Related Videos