Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Mistobaan
Mistobaan / langchain_llamacpp_natural_functions.ipynb
Last active March 19, 2024 22:08
langchain_llamacpp_natural_functions.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mistobaan
Mistobaan / large_world_model.ipynb
Last active February 19, 2024 16:34
large_world_model.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mistobaan
Mistobaan / merge_peft.py
Created February 1, 2024 05:12 — forked from mlabonne/merge_peft.py
Merge base model and peft adapter and push it to HF hub
# Example usage:
# python merge_peft.py --base_model=meta-llama/Llama-2-7b-hf --peft_model=./qlora-out --hub_id=alpaca-qlora
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import argparse
def get_args():
@Mistobaan
Mistobaan / eval-gsm8k-microsoft-phi-2-colab.ipynb
Last active January 28, 2024 01:31
eval-gsm8k-microsoft-phi-2-colab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mistobaan
Mistobaan / ngrok_util.py
Last active January 4, 2024 07:56
How to get current ngrok remote url
# from: https://stackoverflow.com/a/54088479/121687
import json
import requests
def get_ngrok_url():
url = "http://localhost:4040/api/tunnels/"
res = requests.get(url)
res_unicode = res.content.decode("utf-8")
res_json = json.loads(res_unicode)
@Mistobaan
Mistobaan / tensorflow_cuda_osx.md
Last active July 25, 2023 18:54
How to enable cuda support for tensor flow on Mac OS X (Updated on April:2016 Tensorflow 0.8)

These instructions will explain how to install tensorflow on mac with cuda enabled GPU suport. I assume you know what tensorflow is and why you would want to have a deep learning framework running on your computer.

Prerequisites

Make sure to update your homebrew formulas

brew update
@Mistobaan
Mistobaan / TENSORFLOW_DEBUG.md
Last active June 29, 2023 06:32
Tensorflow Internals Debugging Techniques

Machine Setup August 2016

Linux Ubuntu 2016.

  • 1080 GTX
  • SDK 8.0
  • CuDNN 5.1

ENABLE Core dumps

ulimit -c unlimited
@Mistobaan
Mistobaan / README.md
Created October 29, 2016 22:26
How to write a Great Research Paper

How to write a Great Research Paper

From https://www.youtube.com/watch?v=g3dkRsTqdDA

Don’t wait to write!

Writing papers is a primary mechanism for DOING research (not just for repoting it

  1. Idea
  2. Write paper
  3. Do research
@Mistobaan
Mistobaan / deploy_dolly_v2.ipynb
Created April 29, 2023 18:08 — forked from timesler/deploy_dolly_v2.ipynb
Deploy Dolly v2.0 to SageMaker
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mistobaan
Mistobaan / build.sh
Created May 2, 2020 04:38 — forked from stefanondisponibile/build.sh
Build TensorFlow Serving with Sentencepiece custom ops.
#!/bin/bash
CWD=$(pwd)
GPROTOBUF_URL=https://github.com/protocolbuffers/protobuf/releases/download/v3.7.0/protobuf-cpp-3.7.0.tar.gz
compile_gprotobuf () {
sudo apt-get install autoconf automake libtool curl make g++ unzip &&
wget $GPROTOBUF_URL &&
fname=protobuf-cpp-3.7.0.tar.gz &&
tar xvzf $fname && rm $fname &&