A descriptio of all the steps to be able to debug Zed using Zed. This is useful if you want to add features and fix errors within the Zed codebase using Zed itself.
First you need to download and compile the debugger branch:
from tqdm.auto import tqdm | |
import asyncio | |
import aiohttp | |
import json | |
import time | |
import os | |
import textwrap | |
TOGETHER_API_TOKEN = os.environ['TOGETHER_API_TOKEN'] |
# 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(): |
# 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) |
from graphviz import Digraph | |
import torch | |
from torch.autograd import Variable, Function | |
def iter_graph(root, callback): | |
queue = [root] | |
seen = set() | |
while queue: | |
fn = queue.pop() | |
if fn in seen: |