Run Your Own LLM on a Server - Ollama + Gemma 3
Автор: LearnThatStack
Загружено: 2026-05-29
Просмотров: 4516
Описание:
⚡ Sponsored by Hostinger : https://hostinger.com/LTS10
Coupon LTS10 → 10% off any plan.
Run a real LLM on your own server — no API key, no per-token bill, full control over your data.
This tutorial builds a working streaming chat app using Ollama + Gemma 3 4B on a VPS.
You'll install Ollama, pull Gemma 3, call it from the terminal and via REST, then build a Node.js + Express backend that streams tokens straight to a plain HTML frontend - the same token-by-token feel as ChatGPT, on infrastructure you own.
We also cover the honest tradeoffs: when self-hosting is the WRONG call, and when a hosted API still wins.
Works with any open-weight model: Llama, Mistral, Qwen, DeepSeek, whatever drops next.
📋 Commands used (in order):
Install Ollama (skip if your VPS template already ships it)
curl -fsSL https://ollama.com/install.sh | sh
Verify the install
ollama --version
See what models are already pulled
ollama list
Pull Gemma 3 4B (~3.3 GB)
ollama pull gemma3:4b
Chat with the model in the terminal
ollama run gemma3:4b
(measure real speed with: ollama run gemma3:4b --verbose)
type /bye to exit the chat
Check RAM usage with the model loaded
free -h
Call the REST API directly
curl http://localhost:11434/api/generate -d '{
"model": "gemma3:4b",
"prompt": "Why is the sky blue?",
"stream": false
}'
Scaffold the chat app
mkdir llm-chat && cd llm-chat
npm init -y
npm install express
Run the app, then open http://{vps-ip}:3000
node server.js
---
More Videos -
Software Egineering Basics - • Software Engineering Basics
Software Design - • Software Design
AI - • ArtificiaI Intelligence
#sponsored #llm #ollama #selfhosted #AI
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: