This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse | |
| import os | |
| import torch | |
| import numpy as np | |
| from transformers import AutoTokenizer, AutoModelForSequenceClassification | |
| from peft import LoraConfig | |
| from trl import ( | |
| PPOTrainer, | |
| PPOConfig, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| from datasets import load_dataset | |
| from tqdm import tqdm | |
| from transformers import AutoModelForSequenceClassification, AutoTokenizer, BitsAndBytesConfig | |
| from trl import RewardConfig, RewardTrainer | |
| from peft import LoraConfig, get_peft_model | |
| import wandb | |
| import os | |
| import argparse |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pytube | |
| from bs4 import BeautifulSoup | |
| import sqlite3 | |
| import html | |
| import re | |
| import os | |
| from tqdm.notebook import tqdm | |
| import requests | |
| conn = sqlite3.connect('Database.db') |