Skip to content

Instantly share code, notes, and snippets.

View luzhongqiu's full-sized avatar
:bowtie:
nlp llm

zq.deer luzhongqiu

:bowtie:
nlp llm
  • midea
  • shanghai
View GitHub Profile
@luzhongqiu
luzhongqiu / merge_qlora_with_quantized_model.py
Created February 20, 2024 03:46 — forked from ChrisHayduk/merge_qlora_with_quantized_model.py
Merging QLoRA weights with quantized model
"""
The code below combines approaches published by both @eugene-yh and @jinyongyoo on Github.
Thanks for the contributions guys!
"""
import torch
import peft
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import os
import argparse
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument("--base_model_name_or_path", type=str)
@luzhongqiu
luzhongqiu / 结巴词性标记集
Created January 27, 2021 05:05 — forked from hscspring/结巴词性标记集
结巴词性对照表
- a 形容词
- ad 副形词
- ag 形容词性语素
- an 名形词
- b 区别词
- c 连词
- d 副词
- df
- dg 副语素
- e 叹词

Keybase proof

I hereby claim:

  • I am luzhongqiu on github.
  • I am nicq (https://keybase.io/nicq) on keybase.
  • I have a public key whose fingerprint is 94E0 613F 7F0E 9E99 6EAA 2A58 023C EAD3 FF35 17DE

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am luzhongqiu on github.
  • I am nicq (https://keybase.io/nicq) on keybase.
  • I have a public key ASBkxsOLuKEadHzzGFIHIRKxeu9j0LDlSK2shkDFKKN6rQo

To claim this, I am signing this object: