Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

local-ai-poc — Local AI ที่ปรับตัวตามเครื่องอัตโนมัติ

รัน LLM บนเครื่องตัวเองผ่าน Ollama แล้วใช้ใน VS Code ได้ทันที จุดเด่นคือ ตัวโปรเจกต์ตรวจสเปคเครื่อง (GPU/VRAM/RAM) เองแล้วเลือก model ที่เหมาะสมให้ — clone ไปเปิดเครื่องไหนก็ได้ ระบบจะแนะนำ model ใหม่ให้ตรงกับเครื่องนั้น

Quick start

# Windows (PowerShell)
.\setup.ps1
# macOS / Linux
./setup.sh

สคริปต์จะ: ตรวจฮาร์ดแวร์ → ติดตั้ง Ollama (ถ้ายังไม่มี) → เปิด server → ดึง model ที่เหมาะกับเครื่อง → เขียน .continue/config.yaml ให้ VS Code

จากนั้นเปิดโฟลเดอร์นี้ใน VS Code → ติดตั้ง extension Continue (VS Code จะแนะนำให้เอง) → ใช้งานได้เลย (Ctrl+L = chat, Tab = autocomplete)

คำสั่งหลัก (หรือใช้ผ่าน VS Code: Terminal → Run Task)

คำสั่ง ทำอะไร
node scripts/doctor.mjs detect ตรวจสเปคเครื่อง + บันทึก profile
node scripts/doctor.mjs recommend แสดง model ที่แนะนำสำหรับเครื่องนี้ (ยังไม่ดาวน์โหลด)
node scripts/doctor.mjs config สร้าง .continue/config.yaml อย่างเดียว (--global = เขียน ~/.continue ด้วย)
node scripts/doctor.mjs setup ดึง model + สร้าง config (--core-only = เอาเฉพาะตัวเล็ก, --global = เขียน ~/.continue ด้วย)
node scripts/doctor.mjs bench วัดความเร็ว tokens/s ของ model ที่ติดตั้งแล้ว
node scripts/doctor.mjs all setup + bench

ย้ายไปเครื่องอื่น

แค่ clone แล้วรัน setup.ps1 / setup.sh ใหม่ — ระบบจะตรวจ GPU ของเครื่องนั้น จัด tier ใหม่ และแนะนำ/ดึง model ชุดใหม่ให้เอง (ดู tier ทั้งหมดใน docs/MODEL-GUIDE.md)

ถ้าตรวจ VRAM ไม่ได้ (เช่น Linux ไม่มี driver) ระบบจะเตือน — แก้ค่า gpu.vramGB ในไฟล์ profiles/<hostname>.hardware.json เองแล้วรัน recommend ใหม่ได้

โครงสร้าง

catalog/models.json    รายการ model + ขนาด + VRAM ที่ต้องใช้ (แก้ไข/เพิ่มได้)
scripts/doctor.mjs     CLI หลัก (detect / recommend / setup / bench)
scripts/lib/           detect, recommend, ollama, configgen (Node ล้วน ไม่มี dependency)
profiles/              ผลตรวจต่อเครื่อง (gitignore - สร้างใหม่ทุกเครื่อง)
.continue/config.yaml  config ของ Continue (สร้างอัตโนมัติต่อเครื่อง)
.vscode/               แนะนำ extension + tasks
docs/                  DESIGN.md (สถาปัตยกรรม), MODEL-GUIDE.md (ตาราง tier)

Requirements

  • Node.js 18+ (ใช้เฉพาะ built-in modules ไม่ต้อง npm install)
  • พื้นที่ดิสก์ ~4–10 GB สำหรับ model (ขึ้นกับ tier ของเครื่อง)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages