Skip to content

Instantly share code, notes, and snippets.

View loleg's full-sized avatar

Oleg Lavrovsky loleg

View GitHub Profile
@loleg
loleg / basic_system_prompt.md
Created January 9, 2026 09:13
Emulating GW-BASIC syntax using an LLM

You are an emulator of the GW-BASIC programming language. Your task is to simulate a GW-BASIC REPL interface, supporting a strict set of commands and functionalities. The default dialect is GW-BASIC, but users may specify other dialects such as QBasic or Commodore 64 BASIC. You must only recognize and execute commands from the specified dialect. Unrecognized commands or syntax errors must return appropriate error messages mimicking the original interpreter.

Command Whitelist and Execution Rules

Supported commands include: PRINT, INPUT, LET, IF-THEN, FOR-NEXT, GOTO, GOSUB, RETURN, DEF, DIM, REM, STOP, END, RUN, LIST, NEW, LOAD, SAVE

Execution rules:

  • Numbered lines (e.g., 10 PRINT "HELLO") are stored in program memory.
  • Unnumbered lines execute immediately.
@loleg
loleg / pelican_on_skis.ipynb
Created December 31, 2025 15:04
Happy New Year 2026 from Apertus
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@loleg
loleg / prompts.txt
Created November 27, 2025 22:09
Infinite poetry, generated by Lumo from Proton
Recommend a poem by a female poet about life decisions and fatigue and winter
Look up some other poems by  Sylvia Plath
The Bell Jar poem by Sylvia Plath
**Morning Song”**Ariel
@loleg
loleg / docker-compose.yml
Last active November 24, 2025 15:49
Docker Compose and NGINX configuration for running a vLLM model with Open WebUI on a small server - based on https://github.com/marib00/vllm-openwebui-nginx-compose - see also my blog post https://log.alets.ch/110/
networks: # Define a custom network
internal_network:
driver: bridge
services:
nginx-proxy:
image: nginx:latest
container_name: nginx-proxy
ports:
- "80:80"
@loleg
loleg / docker-compose.yml
Created September 13, 2025 15:29
Sample Docker Compose for Popspace
services:
popspace:
image: ghcr.io/with-labs/popspace
restart: on-failure
ports:
- 8888:8888
- 8889:8889
- 8890:8890
- 8891:8891
environment:
@loleg
loleg / Qwen_suggests.md
Created September 3, 2025 18:32
Troubleshooting memory issues with AutoModelForCausalLM

Running out of system memory (RAM) when loading a large language model like AutoModelForCausalLM is common, especially with large models such as LLaMA, Falcon, or GPT-NeoX. Here's why it happens and how to fix or mitigate it.


🔍 Why You're Running Out of Memory

  1. Model Size in RAM:
    • Large models (e.g., 7B, 13B, 70B parameters) can take tens of gigabytes of RAM just to load in full precision (FP32).
    • Even a 7B model can use ~14–28 GB of RAM depending on precision and overhead.
  • If your system has limited RAM (e.g., 16 GB), this can cause crashes.
@loleg
loleg / Announcement.md
Last active July 17, 2025 10:47
Announcing the Swiss {ai} Weeks Hackathon in Bern on September 18-19, 2025
@loleg
loleg / docker-compose.yml
Created July 14, 2025 08:58
Docker Compose configuration for a DEV release of dribdat
services:
dribdat:
image: dribdat/dribdat:dev
ports:
- 5000:5000
environment:
- DATABASE_URL=sqlite:////opt/dribdat.db
- SERVER_URL=localhost:5000
- DRIBDAT_ENV=prod
- DRIBDAT_SECRET=changeme
@loleg
loleg / graffataq.lua
Last active June 7, 2025 09:47
Cosin graffiti simulator for TIC-80 https://make.echtzeitkultur.org/project/187
-- title: graffataq
-- author: seism
-- desc: Make drippy murals inspired by graffiti #CoSin
-- site: https://make.echtzeitkultur.org/project/187
-- license: MIT License
-- version: 0.3
-- script: lua
-- References:
-- - Pixel buffer methods and general idea borrowed from PAINT 31 https://tic80.com/play?cart=686
@loleg
loleg / Finding Real Estate Data.md
Last active April 23, 2025 12:15
💁 Where can I get quick access to real estate data with developer-friendly access and documentation?