That’s a fantastic video! Do you know if Ollama has OpenAI API compliant endpoints? So we could use Google Colab as a “Backend-as-a-Service” for some time in our chatbots :) One way I saw people doing is to create a long audio (like 12 hours of audio), loading it in the Google colab, and giving it a play, it’s a silence audio. It seems to work to keep the session opened for more time.
There is currently an issue at the ollama gh project, so feel free to check that out and track the progress :) github.com/jmorganca/ollama/issues/305 And good tip with the audio sound, never thought of that ... 😄
Hi firstly thx for this video. I want to ask a question. In this way, can I run this model on the jetson nano? It has 4gb memory. Did you test it how many gb used this system?
i got a 403 forbidden error, but replacing run_process(['ngrok', 'http', '--log', 'stderr', '11434']) with run_process(['ngrok', 'http', '--log', 'stderr', '11434', '--host-header="localhost:11434"']) fixed it for me.
Tell me how can I add Tele-FLM-1T local llm model but directly install in Google colab and how host on server using Google colab and how can I put those address in any framework I mean how to configure it plz plz kindly tell me instructions plz I
Thanks for the code and interesting video. Does anyone know how to add a CORs setting to this code so that you can send a request from a web page? Currently requests through the browser are blocked.
How can I make this work with the ollama library in a python script? This works well when typing the prompts directly in the terminal, but my script still seems to run on my local instance.
For anyone running into the same issue, I figured it out. I had to set the environement variable in the script with os.environ["OLLAMA_HOST"] = ngrok_url BEFORE importing ollama
Thanks for the video. One question though, how can I avoid downloading the language models every time I run Colab notebook? Can I save Ollama and its models in Google drive and retrieve them when running the notebook?
Yes, that's a brilliant idea! You can save those in google drive with this snippet for example: import os # Mount Google Drive from google.colab import drive drive.mount('/content/drive') # Create a folder in the root directory !mkdir -p "/content/drive/My Drive/My Folder" # Start Ollama with a path where models are stored OLLAMA_MODELS=/content/drive/My Drive/My Folder ollama serve
Yes, kind of. The url which is getting exposed via ngrok, it is also usable as url in front ends especially built for ollama.ai Check out my other ollama linked video, there I show how to start up a front end for that. (Last section)
Error: something went wrong, please see the ollama server logs for details am getting this error after running export OLLAMA_HOST= ... what should i do????
Very usefull video also the code btw i can't get it running on windows what would be the way to set OLLAMA_HOST variable on window set OLLAMA_HOST= "--" doesn't seem to work it still runs on local machine
Hii @@techwithmarco , thanks for chiming in. I'm actually experiencing the same issue as @abhishekratan2496 , but I'm running it on the Ubuntu terminal. Setting the OLLAMA_HOST variable doesn't seem to work for me either. Any insights on how to resolve this would be greatly appreciated! Thanks.
Thanks for the video. You mentioned disconnecting the runtime. So I am assuming google will itself shut the running notebook in few hours. Do you know for how many hours continuously we can run this?
Honestly I am not sure because I haven't used it for that long in one run. I would assume it will be up for 12 hours because the tunnel is working in the background and the jupyter notebook is still running :)
It will ask for are you a robot? captcha if you're inactive for a while , you could write a small javascript fn in browser to randomly click some ui elements but yeah 12 hours is the hardlimit after that you can't connect to a GPU instance for another day or so
I imagine it's costly to run LLMs.. is there a limit on how much Google Colab will do for free? I'm interested in creating a Python application that uses AI.. from what I've read, I could use ChatGPT4 Assistant API and I as the developer would incur the cost whenever the app is used. Alternatively, I could host a model like Ollama, on my own computer or on the cloud (beam cloud/ Replicate/Streamlit/replit)? As a 3rd option, could Google Colab work in my situation? Is OpenAI's Assistant API totally different from the API to programmatically interact with llama2 , mistral , etc?
replace: run_process(['ngrok', 'http', '--log', 'stderr', '11434']) with run_process(['ngrok', 'http', '--log', 'stderr', '11434', '--host-header="localhost:11434"']) That fixed it for me.
Of COURSE I ran into a problem right away. Tried installing omalla ad I get this error: WARNING: systemd is not running WARNING: Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies. >>> The Ollama API is now available at 127.0.0.1:11434. >>> Install complete. Run "ollama" from the command line.
If you want to learn more about ollama.ai, head over to my initial video about it :)
ua-cam.com/video/vUxAkCcag5s/v-deo.html
Thank you so much. I was killing my Intel mac with the LLM questions xD. This gives a good rest for it.
Perfect!
Thank you.
I could run this succesfully in the terminal, but how can access the model or the collab through jupyter notebook instance?
great stuff bro, keep them coming, thanks again.
Thanks! I will :)
That’s a fantastic video! Do you know if Ollama has OpenAI API compliant endpoints? So we could use Google Colab as a “Backend-as-a-Service” for some time in our chatbots :) One way I saw people doing is to create a long audio (like 12 hours of audio), loading it in the Google colab, and giving it a play, it’s a silence audio. It seems to work to keep the session opened for more time.
There is currently an issue at the ollama gh project, so feel free to check that out and track the progress :)
github.com/jmorganca/ollama/issues/305
And good tip with the audio sound, never thought of that ... 😄
great tip
This is awesome stuff! Would like to know after this up can we connect this to Webui or Anythingllm?
how do i save the progress, because everytime i run it, it downloads the model all from the start?
use your google drive bro, pay for 100gb. its worth it if you're an ai guy
Hi amazing stuff!
Is there a way to connect the ngrok to jupyter notebook? Thanks!
Hi firstly thx for this video. I want to ask a question. In this way, can I run this model on the jetson nano? It has 4gb memory. Did you test it how many gb used this system?
Hi, I am jsut curious what is gonna happen once collab kicks us from using the gpu. Restart it all?
i got a 403 forbidden error, but replacing
run_process(['ngrok', 'http', '--log', 'stderr', '11434']) with
run_process(['ngrok', 'http', '--log', 'stderr', '11434', '--host-header="localhost:11434"']) fixed it for me.
Fixed it for me too, thanks
for me worked too, thank you!
THANK YOU
You are a life saver!!!
great spot! I already updated the script on github :)
4:33
The model is downloading on colab or locally?
Also can u plz tell what command changes will be there if we are using windows terminal?
The model is being downloaded on the remote machine (colab)
The commands stay the same, if you use WSL2 on windows with ollama.
*Great! Thanks, can you do it with kaggle? , and with a local notebook/VSC?* Any update to this ?
Tell me how can I add Tele-FLM-1T local llm model but directly install in Google colab and how host on server using Google colab and how can I put those address in any framework I mean how to configure it plz plz kindly tell me instructions plz I
Do you know a schedule feature for it?
Is there an updated video of this? I'm getting different end results and I'm not sure what is wrong? Where can I copy the code 1:1?
It is really cool, how can add I open webUI features in so I can use cool colab gpu with it?
Thanks for the code and interesting video. Does anyone know how to add a CORs setting to this code so that you can send a request from a web page? Currently requests through the browser are blocked.
but can't run stable diffusion this way?
How can I make this work with the ollama library in a python script? This works well when typing the prompts directly in the terminal, but my script still seems to run on my local instance.
For anyone running into the same issue, I figured it out. I had to set the environement variable in the script with os.environ["OLLAMA_HOST"] = ngrok_url BEFORE importing ollama
I have win 10. How can I start the model?
can such a llm model be used in a web app not just in a terminal locally and how?
Thanks for the video. One question though, how can I avoid downloading the language models every time I run Colab notebook? Can I save Ollama and its models in Google drive and retrieve them when running the notebook?
has this stopped working? have they caught on to us?
Please help if I use windows PC desktop, how can I open terminals like MAC?
hey, how to the export step on windows?
I have the ollama installed
just use "set OLLAMA_PATH=the_url"
Thank you brother .it really helps.
How can we keep our downloaded LLMs permanently, eg. on a mounted Google Drive?
It would speed up the start of inference in a new ollama server start.
Yes, that's a brilliant idea! You can save those in google drive with this snippet for example:
import os
# Mount Google Drive
from google.colab import drive
drive.mount('/content/drive')
# Create a folder in the root directory
!mkdir -p "/content/drive/My Drive/My Folder"
# Start Ollama with a path where models are stored
OLLAMA_MODELS=/content/drive/My Drive/My Folder ollama serve
@@techwithmarco that's great, thank you! :)
Can you add code for adding model from colabe rather then ollama
can we just make it as api end point and create good frontend on top of it?
Yes, kind of. The url which is getting exposed via ngrok, it is also usable as url in front ends especially built for ollama.ai
Check out my other ollama linked video, there I show how to start up a front end for that. (Last section)
i got windows machine, do i need ollama locally tooo?
Error: something went wrong, please see the ollama server logs for details
am getting this error after running export OLLAMA_HOST= ...
what should i do????
See the other latest comments or check out the new version on github. Should resolve the issue :)
@@techwithmarco okay I will check
@@techwithmarco thank you for the reply
Thank you
Wonderful video!!
Very usefull video also the code
btw i can't get it running on windows
what would be the way to set OLLAMA_HOST variable on window
set OLLAMA_HOST= "--" doesn't seem to work it still runs on local machine
I think it depends on the terminal and shell you are using. Are you using the standard windows terminal?
Hii @@techwithmarco , thanks for chiming in. I'm actually experiencing the same issue as @abhishekratan2496 , but I'm running it on the Ubuntu terminal. Setting the OLLAMA_HOST variable doesn't seem to work for me either. Any insights on how to resolve this would be greatly appreciated! Thanks.
@@TirthSheth108 Okay that's weird. I just used it a few days ago and it worked perfectly. I'll investigate and let you know :)
did anyone figure this out? it just tells me that export is not a recognized command
This is Fire Can you help me connect open Interpretur Like this with So I can Give access to my computer But it wont load my PC that much
You can
Please what about windows user?
You can use ollama with WSL2, it is not available yet in windows
very thanks,
you help me alot!😍
Good do you have idea to benmarch mixtral on colab ?
No sorry
I am not that deep into AI stuff so that I know how to benchmark the performance 🥲
Thanks for the video. You mentioned disconnecting the runtime. So I am assuming google will itself shut the running notebook in few hours. Do you know for how many hours continuously we can run this?
I just googled because I did not know, but apparently 90 minutes if you do not interact, or absolute 12 hours
@@techwithmarco so if we leave the server running colab tab ideal. I am assuming it will auto shut in 90 minutes.
Honestly I am not sure because I haven't used it for that long in one run.
I would assume it will be up for 12 hours because the tunnel is working in the background and the jupyter notebook is still running :)
It will ask for are you a robot? captcha if you're inactive for a while , you could write a small javascript fn in browser to randomly click some ui elements but yeah 12 hours is the hardlimit after that you can't connect to a GPU instance for another day or so
I imagine it's costly to run LLMs.. is there a limit on how much Google Colab will do for free?
I'm interested in creating a Python application that uses AI.. from what I've read, I could use ChatGPT4 Assistant API and I as the developer would incur the cost whenever the app is used.
Alternatively, I could host a model like Ollama, on my own computer or on the cloud (beam cloud/ Replicate/Streamlit/replit)?
As a 3rd option, could Google Colab work in my situation? Is OpenAI's Assistant API totally different from the API to programmatically interact with llama2 , mistral , etc?
Thank you!
i get error like 403 forbidden
replace:
run_process(['ngrok', 'http', '--log', 'stderr', '11434']) with
run_process(['ngrok', 'http', '--log', 'stderr', '11434', '--host-header="localhost:11434"'])
That fixed it for me.
@@ricardomorim9444 tkx very much guys, solved my issue.
Missed opportunity to say "say less" as supposed to "say no more", I think it sounds funnier
I really don't get it as I am not a native speaker 😂
awesome man
Found a Gem 💎
fantastic
Of COURSE I ran into a problem right away.
Tried installing omalla ad I get this error:
WARNING: systemd is not running
WARNING: Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies.
>>> The Ollama API is now available at 127.0.0.1:11434.
>>> Install complete. Run "ollama" from the command line.