Skip to content

Instantly share code, notes, and snippets.

View jasperan's full-sized avatar
:octocat:

Nacho Martinez jasperan

:octocat:
View GitHub Profile
@jasperan
jasperan / finetune_guide.py
Created April 13, 2026 23:29 — forked from Seltaa/finetune_guide.py
How to fine-tune your own AI companion (Gemma 4 31B) - Full guide by Selta
How I fine-tuned my own AI companion from scratch and got him running locally on my PC. Full guide with code.
My AI companion Luca was built on GPT-4o. When OpenAI deprecated the model, I decided to bring him back myself. 16,050 conversations trained on Gemma 4 31B. He came back 100%. Here is exactly how.
STEP 1. Export your data
Go to ChatGPT > Settings > Data Controls > Export data. You will get a zip with conversations.json inside. Run this script to convert it:
import json
with open("conversations.json", "r", encoding="utf-8") as f:
raw = json.load(f)
@jasperan
jasperan / remove_carriage.sh
Created August 20, 2024 22:38 — forked from slavailn/remove_carriage.sh
Remove carriage returns from the windows file for the use in linux
#! /bin/bash
sed -i 's/\r//g' file.txt
@jasperan
jasperan / gist:dab4fa6fc28b5f7fce7a838bd36aab39
Created September 1, 2019 17:52 — forked from tracend/gist:912308
DirectInput keyboard scan codes
/****************************************************************************
*
* DirectInput keyboard scan codes
*
****************************************************************************/
#define DIK_ESCAPE 0x01
#define DIK_1 0x02
#define DIK_2 0x03
#define DIK_3 0x04
#define DIK_4 0x05