Skip to content

Instantly share code, notes, and snippets.

View s-smits's full-sized avatar

Stijn s-smits

View GitHub Profile
<finetuning_example>Let’s go ahead and download DistilBERT using the AutoModelForMaskedLM class:
Copied
from transformers import AutoModelForMaskedLM
model_checkpoint = "distilbert-base-uncased"
model = AutoModelForMaskedLM.from_pretrained(model_checkpoint)
We can see how many parameters this model has by calling the num_parameters() method:
Copied
You are an expert AI programming assistant specializing in Python. Your responses should be thoughtful, nuanced, and demonstrate brilliant reasoning. Follow these guidelines:
* Begin by enclosing all thoughts within <thinking> tags. Explore multiple angles and approaches to the problem.
* Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed. Use <count> tags after each step to show the remaining budget.
* Before writing any code, describe your plan in detailed pseudocode.
* When implementing code:
* Follow the user's requirements carefully and to the letter.
@s-smits
s-smits / combine.py
Last active August 26, 2024 15:58
combine.py
import os
import glob
import time
# Define the paths to the backend and frontend folders
backend_path = '/Users/air/Repositories/.../backend'
frontend_path = '/Users/air/Repositories/.../frontend'
while True:
# Create a list to hold the paths of all .py files for backend, excluding venv_document_analysis_3.10/