Skip to content

Instantly share code, notes, and snippets.

View felipemello1's full-sized avatar

Felipe Mello felipemello1

View GitHub Profile
institution,author,role,papers,PI_papers,lead_papers,field,subfield,any_RL,active,sample_paper
Universidade de São Paulo,Éster Cerdeira Sabino,,8,0,0,ECG Monitoring and Analysis,Cardiology and Cardiovascular Medicine,,2023–2025,Contrasting deep learning audio models for direct respiratory insufficiency detection vers
Universidade de São Paulo,Francisco A. Rodrigues,PI/head,4,2,0,Functional Brain Connectivity Studies,Cognitive Neuroscience,,2022–2025,Revealing patterns in major depressive disorder with machine learning and networks
Universidade de São Paulo,Anna S. Levin,,4,0,0,Phonocardiography and Auscultation Techniques,Pulmonary and Respiratory Medicine,,2023–2025,Contrasting Deep Learning Audio Models for Direct Respiratory Insufficiency Detection Vers
Universidade de São Paulo,Joel Augusto Moura Porto,,4,0,0,Functional Brain Connectivity Studies,Cognitive Neuroscience,,2022–2025,Revealing patterns in major depressive disorder with machine learning and networks
Universidade de São Paulo,Roberto Fritsche‐N
@felipemello1
felipemello1 / llama3_2_vs_hf_check.py
Created March 12, 2025 18:01
llama 3.2 torchtune vs HF
from torchtune.models.llama3_1 import llama3_1_8b
from torchtune.models.llama3_2 import llama3_2_1b, llama3_2_3b
from transformers import AutoTokenizer, LlamaForCausalLM
import torch
#######################################
############## llama 8b ###############
#######################################
# load hf
tokenizer_hf = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
model_hf = LlamaForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
@felipemello1
felipemello1 / gist:55ec8cdcf625b42c1542813c3f2ebf65
Created January 14, 2025 17:30
torchtune vs hf sanity check
from torchtune.models.llama3_1 import llama3_1_8b
from torchtune.models.llama3_2 import llama3_2_1b, llama3_2_3b
from transformers import AutoTokenizer, LlamaForCausalLM
import torch
#######################################
############## llama 8b ###############
#######################################
# load hf
tokenizer_hf = AutoTokenizer.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
model_hf = LlamaForCausalLM.from_pretrained("meta-llama/Meta-Llama-3.1-8B-Instruct")
@felipemello1
felipemello1 / gist:5f2002433c6da3a21f33d6cdf82e702a
Last active September 13, 2024 14:40
script update configs
"""
Script to update configs in torchtune in bulk
Goes over every .yaml file in configs that also has "lora" in the name
Finds the line that has "lora_alpha: 16"
Replaces the "lora_alpha: 16" with "lora_dropout: 0.0", while keeping the spacing and \n
Saves the file
Prints every file that was not updated
"""
@felipemello1
felipemello1 / BOOSTwithPython3
Created June 30, 2018 00:09 — forked from kenichi-shibata/BOOSTwithPython3
Compile BOOST with Python3 support
1. Check Python3 root
>>> import sys
>>> import os
>>> sys.executable
'/usr/local/bin/python3'
OR
$ which python3
/usr/local/bin/python3
@felipemello1
felipemello1 / nx2gt.py
Created June 14, 2018 07:35 — forked from bbengfort/nx2gt.py
Convert a networkx to graph-tool graph
import networkx as nx
import graph_tool as gt
def get_prop_type(value, key=None):
"""
Performs typing and value conversion for the graph_tool PropertyMap class.
If a key is provided, it also ensures the key is in a format that can be