commit 3d8678c4dbc231cb0420c6b450dd178e4d30eea4 Author: melainey572536 Date: Tue Feb 11 04:40:21 2025 +0100 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..64ae1f4 --- /dev/null +++ b/Run DeepSeek R1 Locally - with all 671 Billion Parameters.-.md @@ -0,0 +1,67 @@ +
Last week, I showed how to quickly run distilled versions of the DeepSeek R1 model locally. A distilled model is a compressed version of a larger language design, where knowledge from a larger design is transferred to a smaller one to [minimize resource](https://sennurzorer.com) usage without losing too much efficiency. These models are based upon the Llama and Qwen architectures and be available in [versions ranging](https://www.tenisujezd.cz) from 1.5 to 70 billion parameters.
+
Some explained that this is not the REAL DeepSeek R1 and that it is difficult to run the full model locally without several hundred GB of memory. That sounded like a challenge - I thought! First Attempt - Heating Up with a 1.58 bit Quantized Version of DeepSeek R1 671b in Ollama.cpp
+
The designers behind Unsloth dynamically quantized DeepSeek R1 so that it might work on as little as 130GB while still gaining from all 671 billion criteria.
+
A quantized LLM is a LLM whose [parameters](https://ledfan.ru) are kept in [lower-precision formats](https://kodthai.com) (e.g., 8-bit or 4-bit instead of 16-bit). This substantially minimizes memory use and accelerates processing, with very little effect on efficiency. The complete variation of DeepSeek R1 utilizes 16 bit.
+
The compromise in accuracy is hopefully compensated by [increased speed](https://melondesign.nl).
+
I downloaded the files from this collection on Hugging Face and ran the following command with Llama.cpp.
+
The following table from Unsloth shows the suggested value for the n-gpu-layers parameter, which indicates how much work can be offloaded to the GPU.
+
According to the table, I believed 7 need to be the maximum, however I got it keeping up 12. According to Windows Task [Manager](https://quantumpowermunich.de) my GPU has 40 GB of memory, and not 24 as I believed. So then it builds up (7/ 24 * 40 ≈ 12).
+
If you choose to run the [design straight](http://www.m3building.com) with Ollama, you should merge the three GGUF files utilizing [Llama.cpp](https://coco-systems.nl) or a comparable tool first.
+
Above is a few of the text that appears on screen while running the command.
+
Llama.cpp and the quantized design are heavy on memory and CPU, however also utilize the GPU (a little) and constantly read from the disk where the design files are kept.
+
The model duplicates the concern and is preparing yourself to start reasoning.
+
The reasoning, or thinking, is quite lengthy - which also contributes to the total time it takes.
+
Okay, so I need to figure out Alan Turing's crucial [contribution](https://git.purplepanda.cc) to how we live our lives in 2025. Hmm. Let's start by remembering who Alan Turing was. He was a British mathematician and computer system researcher, right? He's understood for his work in code-breaking during World War II, specifically with the Enigma maker. Oh, and he's also thought about one of the fathers of theoretical computer technology and synthetic intelligence.
+
So, his contributions ... Well, the Turing Machine principle is fundamental in computer technology. It's a theoretical model of a computer, which laid the foundation for modern computing. Then there's the Turing Test, which has to do with figuring out whether a device can display intelligent habits equivalent from a human. That relates to [AI](https://zahnarzt-eckelmann.de). Also, his work on morphogenesis, which I believe is about biological patterns and growth, like how organisms develop shapes and patterns.
+
Now, how do these contributions affect life in 2025? Well, we remain in a world where [AI](https://git.cloud.krotovic.com) is ending up being more prevalent. So possibly his work on the Turing Test is influencing how [AI](https://repo.maum.in) is developed and integrated into society. If the Turing Test is a [criteria](https://kkomyunity.nus.kr) for [AI](https://drkaraoke.com) intelligence, then [improvements](https://sebagai.com) in [AI](http://nadiadesign.nl) that pass this test may be significant. But wait, the Turing Test is more of a philosophical benchmark. Maybe the actual algorithms or ideas he established are more fundamental.
+
The Turing Machine model is the basis for the stored-program computer system, which is the architecture of modern-day computer systems. All our computer systems today, consisting of smartphones, servers, and so on, are based upon this principle. So, in 2025, even as innovation advances, the [essential principles](https://uconnect.ae) he laid down would still be the basis for all computational devices. That's quite huge. Without that, we would not have the [computers](http://nisatrade.ru) that power whatever from the web to [AI](https://git.jerl.dev) algorithms.
+
Additionally, his deal with code-breaking during WWII caused developments in cryptography. Modern encryption approaches may have roots in his work, which is essential for safe and secure communication in 2025. Everything from electronic banking to private messaging relies on encryption, so that's a big [contribution](https://epcocbetongtrungdoan.com.vn).
+
Another angle is his influence on the advancement of algorithms. The concept of a universal computing machine enables the creation of complex algorithms that drive [AI](https://www.vytega.com), data analysis, artificial intelligence, and so on. So, any [AI](https://www.vendome.mc) systems in 2025 would stem from his fundamental work.
+
Also, morphogenesis may have influenced fields like biology and genetics. Maybe in 2025, understanding biological patterns helps in locations like [hereditary engineering](https://theboss.wesupportrajini.com) or synthetic biology. But I'm uncertain how straight that ties into daily life compared to computing.
+
[Putting](https://www.vendome.mc) everything together, the most important contribution may be the and the theory of computation, [annunciogratis.net](http://www.annunciogratis.net/author/giseleword) which underpin all modern computing technology. Without that, the digital age would not exist as we know it. In 2025, even with advancements, the standard framework of calculation he offered would still be essential. Alternatively, his deal with [AI](https://www.diamanteboutiques.it) and the Turing Test might be more highlighted in an [AI](http://sundtid.nu)-driven future, however the foundational computing theory seems more fundamental.
+
Wait, however the Turing Test is more about assessing [AI](http://git.foxinet.ru) rather than a contribution to innovation itself. The real contribution is the theoretical basis for computing, which enabled all the [digital tech](https://satjobs.co.uk) we have. So, in 2025, all the wise devices, [AI](https://www.mandyfonville.com), cloud computing, etc, are all developed upon the principles he established. Therefore, his crucial contribution is the concept of a universal Turing device, which is the basis for all modern computer systems, causing the digital revolution that [specifies contemporary](https://foratata.com) life.
+
And finally the response.
+
Alan Turing's most considerable [contribution](https://excelwithdrzamora.com) to how we reside in 2025 is his fundamental operate in theoretical computer technology, especially the principle of the [universal Turing](https://lovelynarratives.com) maker. This theoretical model [established](https://coordinamentodistrettonauticolazio.org) the concepts of modern calculation, [forming](https://www.jurajduris.com) the basis for all digital computers. In 2025, this development underpins the whole digital world, making it possible for [technologies](http://hatzikekzi.de) like expert system, cloud computing, mobile phones, and the internet. Without Turing's conceptual framework, the [development](https://www.kennovation-services.com) of programmable computer systems and subsequent technologies that define modern life-from [AI](http://cibcaban.net) algorithms to protect communication systems-would not have actually been possible. His work on cryptography and the Turing Test likewise contributed to secure interactions and [AI](http://groutec.gr) advancement, however it is the universal Turing machine that remains the cornerstone of our digital existence.
+
In summary: The 1.58 bit quantized model generated 0.39 tokens per second. In total, it took about 37 minutes to [respond](https://vow2vow.com) to the exact same question.
+
I was sort of shocked that I was able 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 really the complete design. Ollama's model library appear to include a full version of [DeepSeek](https://emails.funescapes.com.au) R1. It's 404GB with all 671 billion criteria - that should be genuine enough, right?
+
No, not actually! The variation hosted in Ollamas library is the 4 bit quantized variation. See Q4_K_M in the [screenshot](https://global.gobiz.vn) above? It took me a while!
+
With Ollama set up on my home PC, I just needed to clear 404GB of disk area and run the following [command](https://www.josephdomenicoacc.com) while getting a cup of coffee:
+
Okay, [bphomesteading.com](https://bphomesteading.com/forums/profile.php?id=20722) it took more than one coffee before the download was total.
+
But finally, the download was done, and the excitement grew ... until this [message appeared](https://www.chiarafrancesconi.it)!
+
After a quick see to an online store selling different kinds of memory, I concluded that my motherboard wouldn't support such big [quantities](https://www.plynari.eu) of RAM anyway. But there must be options?
+
Windows enables for virtual memory, suggesting you can switch disk space for virtual (and rather sluggish) memory. I figured 450GB of additional virtual memory, in addition to my 32GB of genuine RAM, ought to be sufficient.
+
Note: Understand that SSDs have a restricted variety of write operations per memory cell before they break. Avoid excessive use of virtual memory if this concerns you.
+
A new effort, and rising enjoyment ... before another mistake message!
+
This time, Ollama attempted to press more of the Chinese language design into the GPU's memory than it might manage. After searching online, it appears this is a known issue, however the service is to let the GPU rest and let the CPU do all the work.
+
Ollama utilizes a "Modelfile" containing configuration for the design and how it must be used. When utilizing designs straight from Ollama's design library, you usually don't handle these files as you need to when downloading designs from Hugging Face or similar sources.
+
I ran the following command to show the existing configuration for DeepSeek R1:
+
Then, I included the following line to the output and waited in a brand-new file called Modelfile:
+
I then produced a brand-new design configuration with the following command, where the last parameter is my name for the design, which now runs completely without GPU use:
+
Once again, the enjoyment grew as I nervously typed the following command:
+
Suddenly, it occurred! No mistake message, however tokens started appearing! Admittedly, the speed was such that if you fasted enough, you might practically get a coffee between each screen update - however it was working! A language model on par with the best from OpenAI, with all its 671 billion specifications, running on my [three-year-old PC](https://www.insidesyv.com) with 32GB (real) RAM!
+
I had actually asked the exact same question to both ChatGPT (4o, o1, 03-mini-high), [DeepSeek](https://moncuri.cl) R1 hosted in China and DeepSeek R1 671b hosted locally.
+
This is the reasoning from DeepSeek R1 running in Ollama on my own computer, as it appeared slowly-token by token.
+
And finally this is the response from DeepSeek R1 [running](http://bluemobile010.com) in Ollama. The model outputs the response with markdown formatting.
+
Alan Turing's most considerable contribution to modern life, especially as we look towards 2025, lies in his foundational deal with computational theory and synthetic intelligence, which underpin almost every aspect of modern-day technology. Here's a structured breakdown:
+
1. Universal Turing Machine (1936 ):
+
- This conceptual design for general-purpose computing is the bedrock of all digital innovation today. It developed that a single machine could carry out any computable job with the ideal program, enabling: Modern Computing Devices (mobile phones, cloud facilities, IoT). +[Software](https://ck2.it) Development, permitting versatile applications across markets.
+
2. In 2025, advancements in quantum computing, [AI](https://scratchgeek.com), and edge computing still count on Turing's concepts of programmable reasoning.
+
3. Expert system & the Turing Test (1950 ):
+
- His framework for evaluating maker intelligence stimulated [decades](https://fitclimbing.com) of research study into human-like [AI](https://www.bngdesign.net). By 2025, this tradition is evident in: - Advanced chatbots, virtual assistants (e.g., GPT-4/ 5), and self-governing systems. +- Ethical arguments around [AI](http://damoa2019.maru.net) [decision-making](http://garudauav.com) in healthcare, finance, and law.
+
4. Cryptography & Security:
+
- Turing's WWII codebreaking work foreshadowed contemporary encryption [techniques](https://secondcareeradviser.com) important for: - Securing digital transactions, personal information, and blockchain innovations. +- Combating cyber threats in a significantly linked world.
+
Why the Universal Machine Stands Apart: While [AI](https://uniline.co.nz) and cryptography are transformative, Turing's theoretical design of computation is the most basic. It made it possible for the creation of programmable systems that drive today's innovations-from [AI](https://x-ternal.es) algorithms to quantum computing research. Without this foundation, the digital facilities of 2025 simply would not exist.
+
So, the length of time did it take, utilizing the 4 bit [quantized model](https://s3saude.com.br)? Quite a while! At 0.05 tokens per 2nd - meaning 20 seconds per token - it took nearly seven hours to get an answer to my concern, including 35 minutes to pack the design.
+
While the design was believing, the CPU, memory, and the disk (used as virtual memory) were close to 100% hectic. The disk where the model file was [conserved](https://arishaecosplay.com) was not hectic during generation of the reaction.
+
After some reflection, I thought possibly it's fine to wait a bit? Maybe we should not ask language models about whatever all the time? Perhaps we ought to think for ourselves first and [funsilo.date](https://funsilo.date/wiki/User:AudreyClinton3) be ready to wait for an answer.
+
This may resemble how computer systems were utilized in the 1960s when devices were large and [kigalilife.co.rw](https://kigalilife.co.rw/author/teresastine/) availability was very minimal. You prepared your [program](https://thutucnhapkhauthucphamchucnang.com.vn) on a stack of punch cards, which an [operator filled](https://room7942.com) into the machine when it was your turn, and you could (if you were lucky) select up the outcome the next day - unless there was a mistake in your program.
+
Compared to the reaction from other LLMs with and without thinking
+
DeepSeek R1, hosted in China, believes for 27 seconds before [providing](https://www.lakarjobbisverige.se) this response, which is somewhat much shorter than my in your area hosted DeepSeek R1's response.
+
ChatGPT answers similarly to DeepSeek however in a much shorter format, with each design supplying a little various actions. The thinking models from OpenAI spend less time [thinking](https://www.mainnetwork.org) than [DeepSeek](https://tigasisi.com).
+
That's it - it's certainly possible to run different quantized variations of DeepSeek R1 in your area, with all 671 billion specifications - on a three year old computer system with 32GB of RAM - simply as long as you're not in too much of a rush!
+
If you really want the full, non-quantized variation of DeepSeek R1 you can find it at Hugging Face. Please let me know your tokens/s (or rather seconds/token) or you get it running!
\ No newline at end of file