Skip to content

Instantly share code, notes, and snippets.

View Keith-Hon's full-sized avatar
👋
Hello!

Keith Hon Keith-Hon

👋
Hello!
View GitHub Profile
@kinoc
kinoc / jserv.py
Last active August 9, 2023 03:05
Simplest FastAPI endpoint for EleutherAI GPT-J-6B
# Near Simplest Language model API, with room to expand!
# runs GPT-J-6B on 3090 and TITAN and servers it using FastAPI
# change "seq" (which is the context size) to adjust footprint
#
# seq vram usage
# 512 14.7G
# 900 15.3G
# uses FastAPI, so install that
# https://fastapi.tiangolo.com/tutorial/
@FreddieOliveira
FreddieOliveira / docker.md
Last active June 30, 2024 12:56
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

import logging
from finetune_trainer import DataTrainingArguments, Seq2SeqTrainingArguments
from seq2seq_trainer import Seq2SeqTrainer
from transformers import AutoConfig, AutoModelForSeq2SeqLM, AutoTokenizer
from utils import Seq2SeqDataCollator, Seq2SeqDataset, build_compute_metrics_fn, freeze_embeds, freeze_params
# Setup logging
logging.basicConfig(level=logging.INFO)