I have installed the Ollama package on Freebsd 14.2 quarterly
on my Dell XPS 15 2019 with a NVIDIA GeForce GTX 1650 and 16 gig of ram
ouput of nvidia-smi
Ollama lets you download and run large language models.
I have installed deepseek-r1, deepseek-coder, mistral and zephyr
i use gptel with emacs to enter the queries and output the response in a org buffer
Ollama also uses the NVIDIA GeForce GTX 1650
ollama set up notes
github.com
emacs config
install the gptel package in emacs
github.com
i have installed the following models
1 - deepseek-r1
ollama.com
2 - deepseek-coder
ollama.com
3 - mistral
4 - zephyr
ollama.com
Install Ollama
You need to run the Ollama server to pull and run models
To run ollama, open 2 terminals.
In the first terminal, run:
you can also create a shell script with the above code to make it easier to run
ollama-server
In the second terminal pull the model you want to install
you need to make sure the ollama server is running
deepseek-r1:7b install
use ollama to pull deepseek-r1:7b
you can then run deepseek-r1:7b
deepseek-coder install
use ollama to pull deepseek-coder
you can then run deepseek-coder
mistral install
use ollama to pull mistral
you can then run mistral
zephyr install
use ollama to pull zephyr
you can then run zephyr
check if ollama is running
you can check if ollama is running and kill it if needed
and kill the ollama server by running
Ollama lama server running
Ollama running deepseek-r1:7b
nvida-smi
run nvidia-smi with the --loop=1 option which updates the output every second
showing the ollama llama server and the process for the query
deepseek-r1:7b running in emacs using gptel
deepseek-r1:7b
i gave deepseek-r1:7b the following prompt in emacs using gptel
and gave it this code
which sets Gemini buffers in gptel to be display in the same emacs window
instead of a split window which is the default
here is the conversation with the prompt set to programming
*** explain the following code
(add-to-list 'display-buffer-alist
'("^*Gemini*" display-buffer-same-window))
<think>
Okay, so I'm trying to understand this LISP code: =(add-to-list 'display-buffer-alist '("^*Gemini*" display-buffer-same-window))=. Let me break it down step by step.
First, =add-to-list= is a Common Lisp function used to modify lists. It's commonly seen in environments where you need dynamic list operations. The syntax of =add-to-list= usually looks like =(add-to-list list object)=, so here, the first argument is ='display-buffer-alist=.
Wait, what does ='display-buffer-alist= refer to? In LISP, single quotes typically denote strings. But when used as a variable name with an apostrophe, it's actually just a literal symbol or variable name without parsing. So =display-buffer-alist= must be a list variable that we're modifying.
Next part is the string ="^*Gemini*"=. That looks like a file path or maybe a display buffer name. The caret and asterisks might indicate some kind of placeholder or special syntax for displaying Gemini in a graphical window, perhaps using a specific protocol or format.
The third argument is =display-buffer-same-window=, which I assume is another variable that probably points to a function or macro used for managing display buffers within the same window. So when we call this function, it likely adds some configuration related to the display buffer to our list.
Putting it all together: this line seems to be adding an entry to a display buffer alist. The string ="^*Gemini*"= is probably a key or identifier for that particular display buffer in the alist. Then, by calling =display-buffer-same-window=, we're invoking some function that handles adding parameters related to this display buffer.
I'm not entirely sure about all the nuances here, but it looks like we're dynamically managing configuration settings for display buffers using LISP functions.
</think>
The code is using the =add-to-list= function in Common Lisp to modify an alist (a list) by adding a new entry. The syntax is:
1. ='display-buffer-alist'=: This refers to the name of the alist where we want to add an entry.
2. ="^*Gemini*"=: This is likely the key or identifier for the specific display buffer in the alist.
3. =display-buffer-same-window=: This appears to be a function or macro that manages the same window's display buffer configuration.
The code adds a new entry to the 'display-buffer-alist' with key "^/Gemini/", and uses the provided function to handle related display buffer settings for the same window.
#+begin_src lisp
(add-to-list 'display-buffer-alist '("^*Gemini*" display-buffer-same-window))
#+end_src
I wil do a video tutorial on installing ollama,
running the ollama server and pulling and running the models
and setting up emacs with gptel
on my Dell XPS 15 2019 with a NVIDIA GeForce GTX 1650 and 16 gig of ram
ouput of nvidia-smi
Code:
nv-sglrun nvidia-smi
Code:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.127.05 Driver Version: 550.127.05 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
Ollama lets you download and run large language models.
I have installed deepseek-r1, deepseek-coder, mistral and zephyr
i use gptel with emacs to enter the queries and output the response in a org buffer
Ollama also uses the NVIDIA GeForce GTX 1650
ollama set up notes
cerberus/ollama/ollama.org at master · NapoleonWils0n/cerberus
cerberus code library. Contribute to NapoleonWils0n/cerberus development by creating an account on GitHub.
emacs config
install the gptel package in emacs
freebsd-dotfiles-xps/.config/emacs/init.el at master · NapoleonWils0n/freebsd-dotfiles-xps
freebsd dotfiles dell xps 15 2019. Contribute to NapoleonWils0n/freebsd-dotfiles-xps development by creating an account on GitHub.
i have installed the following models
1 - deepseek-r1
deepseek-r1
DeepSeek-R1 is a family of open reasoning models with performance approaching that of leading models, such as O3 and Gemini 2.5 Pro.
DeepSeek’s first-generation reasoning models, achieving performance comparable to OpenAI-o1 across math, code, and reasoning tasks.
2 - deepseek-coder
deepseek-coder
DeepSeek Coder is a capable coding model trained on two trillion code and natural language tokens.
DeepSeek Coder is trained from scratch on both 87% code and 13% natural language in English and Chinese. Each of the models are pre-trained on 2 trillion tokens.
3 - mistral
Mistral is a 7B parameter model, distributed with the Apache license. It is available in both instruct (instruction following) and text completion.
4 - zephyr
zephyr
Zephyr is a series of fine-tuned versions of the Mistral and Mixtral models that are trained to act as helpful assistants.
Zephyr is a series of fine-tuned versions of the Mistral and Mixtral models that are trained to act as helpful assistants.
Install Ollama
Code:
sudo pkg install ollama
You need to run the Ollama server to pull and run models
To run ollama, open 2 terminals.
In the first terminal, run:
Code:
OLLAMA_NUM_PARALLEL=1 OLLAMA_DEBUG=1 LLAMA_DEBUG=1 ollama start
you can also create a shell script with the above code to make it easier to run
ollama-server
Code:
#!/bin/sh
OLLAMA_NUM_PARALLEL=1 OLLAMA_DEBUG=1 LLAMA_DEBUG=1 ollama start
In the second terminal pull the model you want to install
you need to make sure the ollama server is running
deepseek-r1:7b install
use ollama to pull deepseek-r1:7b
Code:
ollama pull deepseek-r1:7b
you can then run deepseek-r1:7b
Code:
ollama run deepseek-r1:7b
deepseek-coder install
use ollama to pull deepseek-coder
Code:
ollama pull deepseek-coder
you can then run deepseek-coder
Code:
ollama run deepseek-coder
mistral install
use ollama to pull mistral
Code:
ollama pull mistral
you can then run mistral
Code:
ollama run mistral:latest
zephyr install
use ollama to pull zephyr
Code:
ollama pull zephyr
you can then run zephyr
Code:
ollama run zephyr
check if ollama is running
you can check if ollama is running and kill it if needed
Code:
pgrep ollama
and kill the ollama server by running
Code:
pkill ollama
Ollama lama server running
Makefile:
OLLAMA_NUM_PARALLEL=1 OLLAMA_DEBUG=1 LLAMA_DEBUG=1 ollama start
Ollama running deepseek-r1:7b
Code:
ollama run deepseek-r1:7b
nvida-smi
run nvidia-smi with the --loop=1 option which updates the output every second
showing the ollama llama server and the process for the query
Code:
nvidia-smi --loop=1
deepseek-r1:7b running in emacs using gptel
deepseek-r1:7b
i gave deepseek-r1:7b the following prompt in emacs using gptel
explain the following code
and gave it this code
Code:
(add-to-list 'display-buffer-alist
'("^*Gemini*" display-buffer-same-window))
which sets Gemini buffers in gptel to be display in the same emacs window
instead of a split window which is the default
here is the conversation with the prompt set to programming
*** explain the following code
(add-to-list 'display-buffer-alist
'("^*Gemini*" display-buffer-same-window))
<think>
Okay, so I'm trying to understand this LISP code: =(add-to-list 'display-buffer-alist '("^*Gemini*" display-buffer-same-window))=. Let me break it down step by step.
First, =add-to-list= is a Common Lisp function used to modify lists. It's commonly seen in environments where you need dynamic list operations. The syntax of =add-to-list= usually looks like =(add-to-list list object)=, so here, the first argument is ='display-buffer-alist=.
Wait, what does ='display-buffer-alist= refer to? In LISP, single quotes typically denote strings. But when used as a variable name with an apostrophe, it's actually just a literal symbol or variable name without parsing. So =display-buffer-alist= must be a list variable that we're modifying.
Next part is the string ="^*Gemini*"=. That looks like a file path or maybe a display buffer name. The caret and asterisks might indicate some kind of placeholder or special syntax for displaying Gemini in a graphical window, perhaps using a specific protocol or format.
The third argument is =display-buffer-same-window=, which I assume is another variable that probably points to a function or macro used for managing display buffers within the same window. So when we call this function, it likely adds some configuration related to the display buffer to our list.
Putting it all together: this line seems to be adding an entry to a display buffer alist. The string ="^*Gemini*"= is probably a key or identifier for that particular display buffer in the alist. Then, by calling =display-buffer-same-window=, we're invoking some function that handles adding parameters related to this display buffer.
I'm not entirely sure about all the nuances here, but it looks like we're dynamically managing configuration settings for display buffers using LISP functions.
</think>
The code is using the =add-to-list= function in Common Lisp to modify an alist (a list) by adding a new entry. The syntax is:
1. ='display-buffer-alist'=: This refers to the name of the alist where we want to add an entry.
2. ="^*Gemini*"=: This is likely the key or identifier for the specific display buffer in the alist.
3. =display-buffer-same-window=: This appears to be a function or macro that manages the same window's display buffer configuration.
The code adds a new entry to the 'display-buffer-alist' with key "^/Gemini/", and uses the provided function to handle related display buffer settings for the same window.
#+begin_src lisp
(add-to-list 'display-buffer-alist '("^*Gemini*" display-buffer-same-window))
#+end_src
I wil do a video tutorial on installing ollama,
running the ollama server and pulling and running the models
and setting up emacs with gptel

