Skip to content

Instantly share code, notes, and snippets.

View brunabaudel's full-sized avatar
📱
Busy

Bruna Baudel brunabaudel

📱
Busy
View GitHub Profile
@brunabaudel
brunabaudel / grpo_demo.py
Created January 31, 2025 02:37 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
@brunabaudel
brunabaudel / books
Last active September 8, 2024 11:25
Books
[
{
"id": 285714,
"title":"A guide through the Old Testament",
"description":"An insightful guide that walks readers through the key themes and stories of the Old Testament, providing context and interpretation.",
"author":"Celia Brewer Marshall",
"picture":{
"url":"//covers.openlibrary.org/b/id/577047-S.jpg"
}
},
@brunabaudel
brunabaudel / BlogPost
Created October 6, 2023 08:58
Nested JSON data representing a blog post with comments, where each comment has a user and a date
import Foundation
struct User: Codable {
var username: String
var email: String
}
struct Comment: Codable {
var text: String
var date: Date
@brunabaudel
brunabaudel / PlaygroundError.log
Last active September 10, 2019 04:36
Proxy configuration is not working on Swift 5 (using Charles Proxy)
// The Proxy is configurated but the code isn't using it somehow.
// You can verify this by changing the kCFNetworkProxiesHTTPProxy and kCFNetworkProxiesHTTPPort values,
// and you're going to get the same output when you expect it'd fail.
url request = Optional("https://ip.seeip.org/jsonip")
headers request = Optional(["Accept": "application/json"])
response = Optional(<NSHTTPURLResponse: 0x6000032aca60> { URL: https://ip.seeip.org/jsonip } { Status Code: 200, Headers {
Connection = (
close
);