Building a Local Deepseek II
Instructions on creating data sources for your local neural network
In part I, MK provided instructions on how to set up your own Deepseek. In part II, he explains how to set up the data sources that it will use as its references to answer your questions.
Now we'll prepare some data. Even though RAG can process files with complex formatting, simple txt files work best. The less the AI has to spend time figuring out the file structure, the more it can spend on actual research. Also note that sometimes txt files can have forbidden characters, which you'll find out from the program giving you an error every time you upload the file, even when it's just one single volume. There are online services for automatically removing all characters it deems suspicious. As an example, we'll use Historians' History of the World in 25 volumes by Henry Smith Williams. We could download them individually from Project Gutenberg, but we can have them as a convenient zip file if we use Archive.org instead using this link:
https://archive.org/details/HistoriansHistoryOfTheWorldComprehensiveNarrativeEtc.in25VolumesBy/01.HistorHistWorld.CompNar.etc.v1.25v.Intro.EgyptMesopot.v1.WilliamsHS.HoopJack.Lon.NY.1909/
Choose the FULL TEXT download option, and click the download button for 25 files. Extract them to a folder, and then use this service to merge them into a single file:
https://www.filesmerge.com/merge-text-files.
When it gives you the file browser, select all by clicking the first file, and then holding down the Shift-button, clicking the last one.
If you do receive an error with your own .txt file, you can use this service with the Load file -button:
https://www.text-utils.com/remove-special-characters/ .
Now you should have a file called merge_from_ofoct.txt in your Downloads folder. If you plan to do more research on this data set, rename it to something more descriptive. Give the file to the AI using Browse files, and expect at least ten minutes of processing. Even though on AI standards this is lightning fast, on video game standards it is horribly slow. As long as processing icons are still animated, everything is looking good. Your GPU usage should be very high for all that time, which you can check in the resource manager if you want.
There is no obvious answer as to what the best value of the Max Contents slider should be. You probably shouldn't change Temperature at all until you have a good understanding of how Large Language Model AI's work. The name of the parameter is misleading to the uninitiated. What it means is, how creative the AI is allowed to be in its response. As for Max Contents, it refers to the number of parts it may automatically divide the data to, if there is a lot of it. Note that this may not necessarily reflect the volume numbers in a multi volume book set.
The AI will assess how self-contradictory the data is based on comparing these parts to each other. Leave it in the default on your first run, but this is something you may want to experiment with later. So, to repeat, if the response mentions something like "Source 3" there is usually no way for you to know which book volume it is talking about. You need to ask it further questions referring to the source numbers in order to figure it out if necessary.
Always click Clear Chat History if you are about to ask a question that is not a follow-up to the previous ones. Otherwise it will assume those are the question's immediate context, usually leading to pure nonsense. When in doubt, always clear the chat history.
Since you're dealing directly with the model, there will be a lot of useless data in the response. Normally a chatbot would clean this up before showing it to the user, and you'd find the whole response only in the logs. Scroll up past the massive list of words and terms, to where the think-tags start. Even the think portion is not the actual response, you can simply take a closer look at how it arrived at it. The actual response, which is the only part you'd show to the user, is below the think-tags and above the massive Node List.
Here is an example exchange of the relevant parts that I received from a 14 billion parameter local DeepSeek, which is twice as many as the 7b default.
Q: How is Christianity relevant to the history of Europe?
Christianity has profoundly shaped the history of Europe across various dimensions:
Moral and Structural Framework: Christianity provided a unifying moral structure during periods of anarchy and ignorance, offering creeds and ceremonies that maintained order and reverence.
Political and Social Dynamics: The introduction of Islam into regions like China altered relations between Christian Europe and the Orient, leading to religious conflicts and wars, highlighting Christianity's role in shaping political and social interactions.
Spread Through Leadership: Significant rulers, such as the one mentioned in Source 3, converted to Catholicism, saving the Church from heresy and paganism. Their actions influenced the spread of Christianity and its establishment in Europe.
Cultural Protection: The Slavs' late arrival in Europe coincided with their role in protecting and propagating Christian civilization against Asiatic invasions, underscoring Christianity's importance in safeguarding European culture.
Cultural and Intellectual Influence: Christianity's mythology evolved into a comprehensive system of belief that deeply influenced European cultural and intellectual life, becoming integral to Latin Christianity by the Middle Ages.
In summary, Christianity was central to Europe's historical development, shaping its moral fabric, political relations, cultural identity, and intellectual landscape.
And here is the reasoning behind the answer that an end user wouldn't have seen:
Okay, so I need to figure out how Christianity is relevant to the history of Europe based on the provided sources. Let me start by going through each source one by one and see what they say about Christianity's role in European history.
Source 1 seems to be talking about the papacy and its influence. It mentions that without Christianity, Europe might have fallen into anarchy or brute force, but Christianity provided a uniform hierarchical structure through creeds and ceremonies. So, it looks like Christianity was crucial in maintaining order and providing a moral framework during chaotic times.
Source 2 discusses how Islam's introduction into China affected relations between Christian Europe and the Orient. It mentions that the Turk became a champion of an Asian faith hostile to Christianity, leading to religious wars. This shows that Christianity was a significant factor in the political and social dynamics between Europe and other regions, especially during conflicts.
Source 3 talks about a ruler who converted to Catholicism, saving the Roman Church from heresy and paganism. It highlights how his actions influenced the spread of Catholicism and solidified its position in Europe. This indicates that individual rulers' conversions had a major impact on Christianity's role in shaping European history.
Source 4 is about the Slavs and their late appearance in European civilization. It mentions that while other groups like Latins and Germans were already influenced by Greco-Roman culture and Christianity, the Slavs came later and faced invasions. This suggests that Christianity was a key part of Europe's cultural and civilizational development, helping to protect and propagate it against external threats.
Source 5 focuses on Christian mythology and its evolution over time. It talks about how creeds formed only a small part of Christian belief, with the rest growing from natural instincts and becoming fully developed during the Middle Ages. This shows that Christianity's influence went beyond just religious practices; it shaped cultural and intellectual aspects of European society.
Putting this all together, I can see several key points: Christianity provided structure and moral guidance during difficult times, influenced Europe's relations with other regions, was spread through significant political figures' conversions, played a role in protecting European civilization against invasions, and deeply influenced the cultural and intellectual landscape. These factors highlight how intertwined Christianity is with the historical development of Europe.
The advantage of having your own local neural network and thereby controlling the data sources being analyzed can be clearly seen by directing the exact same question to the online version of Deepseek, which has access to a much larger pool of relevant information.
Christianity has played a central role in shaping the history, culture, and identity of Europe. Its influence spans nearly two millennia, affecting politics, law, art, philosophy, and social structures. Here are some key ways Christianity has been relevant to European history:
1. Foundation of European Civilization
Christianity became the dominant religion of the Roman Empire (4th century AD) and provided a unifying cultural and moral framework after Rome's fall. Monasteries preserved classical knowledge (Greek, Roman, and Christian texts) during the Early Middle Ages, laying the groundwork for Europe's intellectual revival.
2. Political and Legal Influence
The Church shaped medieval kingship through the concept of divine right (rulers being God’s representatives). The Papacy wielded immense power, sometimes rivaling emperors (e.g., Investiture Controversy between Pope Gregory VII and Emperor Henry IV). Christian moral teachings influenced European legal systems, including concepts of justice, human dignity, and natural law.
3. Cultural and Artistic Legacy
Christianity inspired Europe’s greatest art, architecture, and music (e.g., Gothic cathedrals, Renaissance paintings, Gregorian chant, Bach’s compositions). The Bible and Christian themes were central to literature, from Dante’s Divine Comedy to Milton’s Paradise Lost.
4. Education and Universities
The Church founded Europe’s first universities (e.g., Bologna, Paris, Oxford) in the Middle Ages. Theology was the "queen of the sciences," but Christian scholars also advanced philosophy, mathematics, and early science.
5. Wars and Conflicts
Christianity was both a unifying and divisive force:
Crusades (1095–1291) – Religious wars against Muslim powers, shaping Europe’s relationship with the Middle East.
Reformation (16th century) – Martin Luther and Protestant reformers challenged Catholic authority, leading to wars (e.g., Thirty Years’ War) and lasting religious divisions.
Religious Persecution – Conflicts between Catholics, Protestants, and Orthodox Christians (e.g., Spanish Inquisition, Huguenot persecutions).
6. Colonialism and Global Influence
European colonial powers (Spain, Portugal, France, Britain) spread Christianity worldwide, often intertwining missionary work with imperial expansion. Christian ethics influenced debates on slavery, human rights, and social justice (e.g., abolitionist movements in the 19th century).
7. Modern Europe and Secularization
Christianity shaped modern European values (human rights, democracy, charity), even as secularism grew after the Enlightenment. Today, while church attendance has declined in Western Europe, Christian heritage remains visible in holidays, art, and ethical debates (e.g., bioethics, immigration).
Conclusion
Christianity is deeply embedded in Europe’s historical DNA—its legacy is seen in its cathedrals, laws, wars, and ideals. Even in an increasingly secular Europe, its influence persists in cultural identity and moral frameworks. Whether as a force for unity or conflict, Christianity has undeniably shaped the continent’s past and present.
Although the answers are very similar, as they should be given the nature of the question and its foundation in well-known historical facts, it’s not hard to see the difference between the narrower perspective of the 25 volumes of the Historians’ History and the broader data pool being utilized by online Deepseek.
I have a good idea for this post, but it has more to do with the local aspect of AI in regards to security. In the past I was hesitant to use AI for learning and understanding engineering manuals by maintenance personnel because the manuals and systems are proprietary property of the companies that make the equipment. The employees can use the manuals, but they aren’t for general consumption. They aren’t even allowed to make copies of the manuals. If I could make a local AI out of the manuals, what a great troubleshooting tool it would be, especially for new employees. They could chat with a local AI and understand how the systems they need to inspect and repair work.
If I made a local AI, could I be sure that the proprietary information doesn’t go to wherever on some memory at Deepseek? I was always apprehensive to upload the manuals to Chat GPT for security concerns, but if I could build a local AI, there would there be any security concerns?
Thank you!