Skip to content

Experiments with the LLM OS philosophy proposed by Andrej Karpathy

Notifications You must be signed in to change notification settings

martintmv-git/llm_os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM OS

Personal Workspace Fork

This repository contains an initial implementation of the LLM OS proposed by Karpathy. He talks about it in this tweet, this tweet and this video.

The LLM OS philosophy

llm-os

  • LLMs are the kernel process of an emerging operating system.
  • This process (LLM) will solve problems by coordinating other resources (like memory or computation tools).
  • The LLM OS Vision:
    • It can read/generate text
    • It has more knowledge than any single human about all subjects
    • It can browse the internet
    • It can use existing software infra (calculator, python, mouse/keyboard)
    • It can see and generate images and video
    • It can hear and speak, and generate music
    • It can think for a long time using a system 2
    • It can “self-improve” in domains
    • It can be customized and fine-tuned for specific tasks
    • It can communicate with other LLMs

[x] indicates functionality that is implemented in the LLM OS app

Running the LLM OS:

Note: Fork and clone this repository if needed

1. Create a virtual environment

mkdir llm_os_env
cd llm_os_env
conda create --prefix ./env python=3.11    # choose python version
conda activate ./env

2. Install libraries

pip install -r requirements.txt

3. Export credentials

  • Out initial implementation uses GPT-4o, so export your OpenAI API Key
export OPENAI_API_KEY=***
  • To use Exa for research, export your EXA_API_KEY (get it from here)
export EXA_API_KEY=xxx

4. Run PgVector

We use PgVector to provide long-term memory and knowledge to the LLM OS. Please install docker desktop and run PgVector using either the helper script or the docker run command.

  • Run using a helper script
./pgvector/run_pgvector.sh
  • OR run using the docker run command
docker run -d \
  -e POSTGRES_DB=ai \
  -e POSTGRES_USER=ai \
  -e POSTGRES_PASSWORD=ai \
  -e PGDATA=/var/lib/postgresql/data/pgdata \
  -v pgvolume:/var/lib/postgresql/data \
  -p 5532:5432 \
  --name pgvector \
  phidata/pgvector:16

5. Run the LLM OS App

streamlit run app.py

Original repository 👉🏻 https://git.new/llm-os

About

Experiments with the LLM OS philosophy proposed by Andrej Karpathy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published