Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/mattsoh/LLM
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsoh committed Sep 20, 2024
2 parents 6cf5f50 + 28653ef commit 498a5c5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: python generate.py
4 changes: 3 additions & 1 deletion generate.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from flask import Flask, request, render_template_string
import torch
import tiktoken
import gdown
import os
from helper import generate_and_print_sample, GPT

app = Flask(__name__)

GPT_CONFIG = {
"vocab_size": 50257,
"context_length": 256,
Expand All @@ -16,7 +19,6 @@

FILE_ID = "1mkhifEI6HQoiVahnGgZaRYsVU23req_M"
MODEL_PATH = "model.pth"

if not os.path.exists(MODEL_PATH):
try:
print("Downloading model.pth from Google Drive...")
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tiktoken==0.7.0
torch==2.4.1
gdown
gdown
1 change: 1 addition & 0 deletions runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python-3.12.0

0 comments on commit 498a5c5

Please sign in to comment.