ggml-org/ggml

Instruct GPT-J

Offen

#50 geöffnet am 27.03.2023

 (1 Kommentar) (2 Reaktionen) (0 zugewiesene Personen)C++ (1.788 Forks)auto 404
enhancementgood first issue

Repository-Metriken

Stars
 (15.223 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 11h 12m) (22 gemergte PRs in 30 T)

Beschreibung

Someone fine-tuned GPT-J on the Alpaca instruction dataset using PETF:

peft_model_id = "crumb/Instruct-GPT-J"
config = PeftConfig.from_pretrained(peft_model_id)
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, return_dict=True, load_in_8bit=True, device_map='auto', revision='sharded')
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
# Load the Lora model
model = PeftModel.from_pretrained(model, peft_model_id)

# This example is in the alpaca training set
batch = tokenizer("Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: How can we reduce air pollution? ### Response:", return_tensors='pt')

Recently I have successfully tried GPT-J model itself on GGML, using converted binary provided, so I suppose InstructGPT-J it should work off the shelf converting the checkpoint and then doing quantization.

Model adapter is here

Contributor Guide