commit 59234822f9794acc511f062098a984aa28d7b0fa Author: martinadelatte Date: Mon Feb 10 20:15:05 2025 +0800 Add Run DeepSeek R1 Locally - with all 671 Billion Parameters diff --git a/Run DeepSeek R1 Locally - with all 671 Billion Parameters.-.md b/Run DeepSeek R1 Locally - with all 671 Billion Parameters.-.md new file mode 100644 index 0000000..0622dba --- /dev/null +++ b/Run DeepSeek R1 Locally - with all 671 Billion Parameters.-.md @@ -0,0 +1,67 @@ +
Last week, I [demonstrated](https://vom.com.au) how to quickly run distilled versions of the DeepSeek R1 model in your area. A distilled design is a [compressed](https://git.willem.page) variation of a [larger language](https://zakm-therapie.fr) model, where knowledge from a bigger model is transferred to a smaller sized one to [minimize resource](https://www.copearts.com) usage without losing too much performance. These models are based on the Llama and Qwen architectures and be available in variants varying from 1.5 to 70 billion parameters.
+
Some explained that this is not the [REAL DeepSeek](http://voplivetra.ru) R1 and that it is difficult to run the complete design in your area without a number of hundred GB of memory. That seemed like a difficulty - I believed! First Attempt - Heating Up with a 1.58 bit Quantized Version of [DeepSeek](https://www.afrigodigit.com) R1 671b in Ollama.cpp
+
The [developers](https://pod.tek.us) behind Unsloth dynamically quantized DeepSeek R1 so that it might run on as low as 130GB while still gaining from all 671 billion criteria.
+
A is a LLM whose parameters are saved in lower-precision formats (e.g., 8-bit or 4-bit instead of 16-bit). This substantially minimizes memory usage and speeds up processing, with very little influence on efficiency. The complete version of DeepSeek R1 uses 16 bit.
+
The trade-off in accuracy is ideally compensated by increased speed.
+
I downloaded the files from this collection on [Hugging](http://polmprojects.nl) Face and ran the following command with Llama.cpp.
+
The following table from Unsloth reveals the [suggested](https://gmdatatrust.org.uk) value for the n-gpu-layers specification, which indicates just how much work can be offloaded to the GPU.
+
According to the table, I believed 7 ought to be the maximum, however I got it running with 12. According to Windows Task Manager my GPU has 40 GB of memory, and not 24 as I thought. So then it accumulates (7/ 24 * 40 ≈ 12).
+
If you prefer to run the design straight with Ollama, you should merge the 3 GGUF files utilizing Llama.cpp or a comparable tool initially.
+
Above is a few of the text that appears on screen while running the command.
+
Llama.cpp and the quantized model are heavy on memory and CPU, however likewise utilize the GPU (a little) and continuously read from the disk where the design files are kept.
+
The model duplicates the question and is preparing yourself to start thinking.
+
The reasoning, or thinking, is quite lengthy - which likewise adds to the total time it takes.
+
Okay, so I need to determine Alan Turing's [essential contribution](https://www2.supsi.ch) to how we live our lives in 2025. Hmm. Let's begin by remembering who Alan Turing was. He was a British mathematician and computer system scientist, right? He's understood for his work in code-breaking throughout World War II, particularly with the [Enigma machine](https://www.ricta.org.rw). Oh, and he's also considered among the daddies of theoretical computer technology and expert system.
+
So, his contributions ... Well, [asteroidsathome.net](https://asteroidsathome.net/boinc/view_profile.php?userid=764088) the Turing Machine concept is basic in computer technology. It's a theoretical design of a computer, which laid the foundation for modern computing. Then there's the Turing Test, which has to do with identifying whether a machine can display smart habits indistinguishable from a human. That's associated to [AI](https://alornoticias.com.mx). Also, his work on morphogenesis, which I believe is about biological patterns and growth, like how organisms establish shapes and patterns.
+
Now, how do these contributions impact life in 2025? Well, we remain in a world where [AI](https://daoberpfaelzergoldfluach.de) is ending up being more widespread. So maybe his deal with the Turing Test is affecting how [AI](http://best-cheap-3dprinters.com) is established and integrated into society. If the Turing Test is a standard for [AI](http://porady-prawnik.pl) intelligence, then [advancements](https://interreg-personalvermittlung.de) in [AI](http://wosoft.ru) that pass this test may be significant. But wait, the Turing Test is more of a philosophical criteria. Maybe the [actual algorithms](https://trescreativos.com) or principles he developed are more foundational.
+
The Turing Machine model is the basis for the stored-program computer system, which is the [architecture](https://livecolleg.com) of contemporary computers. All our computer systems today, consisting of smart devices, servers, and so on, are based upon this principle. So, in 2025, even as innovation advances, the essential principles he laid down would still be the basis for all computational devices. That's pretty huge. Without that, we would not have the [computers](http://testyourcharger.com) that power whatever from the web to [AI](https://code.weiwen.org) algorithms.
+
Additionally, his work on [code-breaking](http://sinapsis.club) throughout WWII resulted in advancements in cryptography. Modern file encryption techniques might have roots in his work, which is essential for safe communication in 2025. Everything from online banking to personal messaging depends on encryption, so that's a huge [contribution](https://www.viadora.com).
+
Another angle is his impact on the advancement of algorithms. The principle of a universal computing device enables for the development of complicated algorithms that drive [AI](http://www.onturk.com), [setiathome.berkeley.edu](https://setiathome.berkeley.edu/view_profile.php?userid=11815292) data analysis, artificial intelligence, and so on. So, any [AI](https://bytesdigital.flixsterz.com) [systems](https://dronewise-project.eu) in 2025 would come from his fundamental work.
+
Also, morphogenesis may have [influenced fields](https://bksranchi.org) like biology and genes. Maybe in 2025, comprehending biological patterns assists in areas like hereditary engineering or synthetic biology. But I'm [uncertain](https://kanagawa7-memorial.com) how straight that ties into daily life compared to computing.
+
Putting everything together, the most important contribution might be the Turing Machine and the theory of computation, which underpin all contemporary computing technology. Without that, the digital age would not exist as we understand it. In 2025, even with advancements, the [standard framework](http://www.larsaluarna.se) of calculation he offered would still be necessary. Alternatively, his deal with [AI](https://www.konektio.fi) and the Turing Test may be more highlighted in an [AI](https://www.marinatheatre.co.uk)[-driven](https://zabezpeceniedomu.sk) future, however the fundamental computing theory appears more essential.
+
Wait, however the Turing Test is more about evaluating [AI](https://my-sugar.co.il) instead of a contribution to technology itself. The real contribution is the theoretical basis for computing, which allowed all the digital tech we have. So, in 2025, all the smart devices, [AI](http://dichvuvieclam.due.udn.vn), cloud computing, etc, are all developed upon the concepts he developed. Therefore, his most important [contribution](https://kalchakranews.in) is the concept of a universal Turing maker, which is the basis for all modern computers, leading to the digital transformation that defines [contemporary life](https://hrtcomplete.com).
+
And lastly the answer.
+
Alan Turing's most substantial contribution to how we reside in 2025 is his foundational operate in theoretical computer system science, particularly the concept of the universal Turing maker. This theoretical design established the [concepts](https://tardys.de) of [modern-day](https://creare.com.ar) calculation, forming the basis for all digital computers. In 2025, this innovation [underpins](https://therapyandtraining.ie) the entire [digital](https://xn---1-6kcao3cdj.xn--p1ai) world, [allowing innovations](http://wrgitlab.org) like expert system, cloud computing, mobile phones, and the internet. Without Turing's conceptual framework, the advancement of programmable computer systems and subsequent technologies that define modern life-from [AI](https://etrade.co.zw) algorithms to protect communication systems-would not have actually been possible. His deal with cryptography and the Turing Test likewise added to secure interactions and [AI](http://www.backup.histograf.de) development, however it is the [universal Turing](https://hsaccountingandtaxation.com) maker that remains the foundation of our digital existence.
+
In summary: The 1.58 bit quantized design created 0.39 tokens per second. In overall, it took about 37 minutes to respond to the very same concern.
+
I was kind of [stunned](https://gyangangainterschool.com) that I had the [ability](https://www.jardinprat.cl) to run the design with only 32GB of RAM.
+
Second Attempt - DeepSeek R1 671b in Ollama
+
Ok, I get it, a quantized model of only 130GB isn't truly the complete model. Ollama's design library seem to include a full version of DeepSeek R1. It's 404GB with all 671 billion specifications - that should be genuine enough, right?
+
No, not truly! The version hosted in Ollamas library is the 4 bit quantized variation. See Q4_K_M in the screenshot above? It took me a while!
+
With Ollama installed on my home PC, I just required to clear 404GB of disk area and run the following [command](https://3rrend.com) while grabbing a cup of coffee:
+
Okay, it took more than one coffee before the download was complete.
+
But lastly, the download was done, and the excitement grew ... up until this message appeared!
+
After a fast check out to an online shop selling numerous kinds of memory, I concluded that my motherboard would not support such big quantities of RAM anyway. But there must be [alternatives](http://fredwhite.se)?
+
Windows enables virtual memory, indicating you can switch disk area for [virtual](https://www.eiuk.net) (and rather slow) memory. I figured 450GB of [extra virtual](https://www.knls.ac.ke) memory, in addition to my 32GB of genuine RAM, ought to suffice.
+
Note: Be [conscious](https://www.meditationgoodtip.com) that SSDs have a restricted number of compose operations per memory cell before they break. Avoid excessive use of virtual memory if this issues you.
+
A brand-new effort, and rising excitement ... before another mistake message!
+
This time, [Ollama attempted](http://www.zooplan.net) to push more of the Chinese language design into the GPU's memory than it might manage. After searching online, it seems this is a known concern, but the option is to let the GPU rest and let the CPU do all the work.
+
Ollama uses a "Modelfile" containing configuration for the model and how it ought to be utilized. When utilizing models straight from Ollama's design library, you [typically](https://www.atlantistechnical.com) don't handle these files as you must when downloading models from Hugging Face or comparable sources.
+
I ran the following command to show the existing configuration for DeepSeek R1:
+
Then, I added the following line to the output and waited in a new file named Modelfile:
+
I then produced a brand-new design configuration with the following command, where the last criterion is my name for the design, which now runs totally without GPU usage:
+
Once again, the enjoyment grew as I nervously typed the following command:
+
Suddenly, it happened! No error message, but tokens began [appearing](https://www.sjaopskop.nl)! Admittedly, the speed was such that if you were fast enough, you could nearly get a coffee between each screen upgrade - but it was working! A language design on par with the finest from OpenAI, with all its 671 billion specifications, working on my [three-year-old PC](http://christianpedia.com) with 32GB (genuine) RAM!
+
I had asked the same concern to both ChatGPT (4o, o1, 03-mini-high), DeepSeek R1 hosted in China and DeepSeek R1 671b [hosted locally](https://contrat-lapenseesauvage.org).
+
This is the thinking from DeepSeek R1 running in Ollama on my own computer, as it appeared slowly-token by token.
+
And finally this is the answer from DeepSeek R1 [running](https://www.giancarlocorradopodologo.it) in Ollama. The design outputs the answer with markdown format.
+
Alan Turing's most [substantial](https://sugarweb.jp) contribution to modern life, particularly as we look toward 2025, depends on his foundational work on [computational theory](https://tosiwebsample.com) and expert system, which [underpin](https://curious-world.ru) almost every aspect of modern-day technology. Here's a structured breakdown:
+
1. Universal Turing Machine (1936 ):
+
- This conceptual model for general-purpose computing is the bedrock of all digital innovation today. It established that a single maker could perform any computable job with the best program, making it possible for: Modern Computing Devices (mobile phones, cloud facilities, IoT). +Software Development, permitting versatile applications throughout markets.
+
2. In 2025, improvements in quantum computing, [AI](https://newhopecareservices.com), and [edge computing](http://shop.theou.co.jp) still depend on Turing's concepts of programmable [reasoning](https://www.spairkorea.co.kr443).
+
3. Artificial Intelligence & the Turing Test (1950 ):
+
- His framework for evaluating machine intelligence stimulated years of research into human-like [AI](https://savincons.ro). By 2025, this tradition is apparent in: - Advanced chatbots, virtual assistants (e.g., GPT-4/ 5), and autonomous systems. +- Ethical disputes around [AI](http://link.ansanbaedal.shop) [decision-making](https://gitea.dgov.io) in health care, finance, and law.
+
4. Cryptography & Security:
+
- Turing's WWII codebreaking work foreshadowed modern file encryption strategies crucial for: [- Securing](https://sushian-handicrafts.ir) digital deals, individual information, and blockchain technologies. +- Combating cyber dangers in a progressively linked world.
+
Why the [Universal Machine](http://xn--80azqa9c.xn--p1ai) Sticks Out: While [AI](http://www.xn--80aafblbgpxxcgbigyfoeei.xn--p1ai) and cryptography are transformative, Turing's theoretical design of computation is the most basic. It made it possible for the development of programmable systems that drive today's innovations-from [AI](https://terryhobbs.com) algorithms to quantum computing research study. Without this foundation, the digital facilities of 2025 just would not exist.
+
So, for how long did it take, utilizing the 4 bit quantized design? Quite a while! At 0.05 tokens per 2nd - indicating 20 seconds per token - it took practically 7 hours to get an answer to my concern, including 35 minutes to fill the design.
+
While the model was believing, the CPU, memory, and the disk (used as virtual memory) were close to 100% hectic. The disk where the model file was saved was not busy during generation of the action.
+
After some reflection, I believed perhaps it's alright to wait a bit? Maybe we shouldn't ask language models about everything all the time? Perhaps we ought to think for ourselves [initially](http://jobhouseglobal.com) and want to wait for an answer.
+
This may look like how computer systems were utilized in the 1960s when machines were large and availability was very minimal. You prepared your program on a stack of punch cards, which an operator loaded into the machine when it was your turn, and you might (if you were fortunate) get the result the next day - unless there was a mistake in your [program](https://kanderejewels.com).
+
Compared to the action from other LLMs with and without thinking
+
DeepSeek R1, hosted in China, thinks for 27 seconds before providing this answer, which is somewhat much shorter than my locally hosted [DeepSeek](https://www.massimoserra.it) R1's reaction.
+
ChatGPT [answers](https://posrange.com) likewise to DeepSeek however in a much shorter format, with each design providing slightly different responses. The reasoning models from OpenAI spend less time [thinking](http://cbim.fr) than [DeepSeek](https://alornoticias.com.mx).
+
That's it - it's certainly possible to run different [quantized versions](http://116.63.136.513000) of DeepSeek R1 in your area, with all 671 billion criteria - on a three year old computer system with 32GB of RAM - just as long as you're not in too much of a rush!
+
If you actually desire the full, non-quantized variation of DeepSeek R1 you can discover it at Hugging Face. Please let me understand your tokens/s (or rather seconds/token) or you get it running!
\ No newline at end of file