Ollama
How to use Ollama on Visual Studio Code
Make sure you have already requested GPU computing resources for your VS Code environment. You will not be able to use Ollama without a GPU-enabled environment.
Start a terminal session and then execute the following command to start Ollama:
ollama serveStart a second terminal session (in Visual Studio Code click the
+symbol at the top right of the terminal) and then execute:ollama run llama3The first time you execute a run it will download the model which may take some time. Subsequent runs will be much faster as they do not need to re-download the model. You can view the models which you have downloaded with the
ollama listcommand.Now you can interact with the model in the terminal in a chat-like fashion as demonstrated below:
To query the model, input text after the
>>>characters and hit enter.This example uses
llama3but other models are available in the Ollama Library.


