Low-rank adapters (r=16) finetuned over 1.6m new tokens of a FLAN task mixture, with the start of each example cut off if it was too large to fit within a 256 token context.
The model reaches a train ppl of 4.36 and an eval ppl of 4.32.
Inference Example (Chain-of-Thought prompt):
# %pip install -qq transformers git+https://github.com/huggingface/peft accelerate bitsandbytesfrom peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
peft_model_id = "crumb/FLAN-OPT-6.7b-LoRA"
config = PeftConfig.from_pretrained(peft_model_id)
model = AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path, load_in_8bit=True, low_cpu_mem_usage=True, device_map='auto')
model = PeftModel.from_pretrained(model, peft_model_id)
tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
import torch
prompt = """Q: Answer the following yes/no question by reasoning step-by-step. Could a dandelion suffer from hepatitis?A: Hepatitis only affects organisms with livers. Dandelions don’t have a liver. The answer is no.Q: Answer the following yes/no question by reasoning step-by-step. Can you write a whole Haiku in a single tweet?A: A haiku is a japanese three-line poem. That is short enough to fit in 280 characters. The answer is yes.Q: Answer the following yes/no question by reasoning step-by-step. Can you reach space with a Cessna?A: """.strip()
inputs = tokenizer([prompt], return_tensors='pt')
with torch.autocast("cuda", dtype=torch.float16):
outputs = model.generate(
input_ids=inputs.input_ids.cuda(),
attention_mask=inputs.attention_mask.cuda(),
max_new_tokens=32,
top_p=0.95,
temperature=0.5,
do_sample=True
)
print("\n".join(tokenizer.decode(outputs[0]).split("\n")[:prompt.count("\n")+1]))
# A Cessna is a small plane. A small plane can't get into space. The answer is no.
Runs of crumb FLAN-OPT-6.7b-LoRA on huggingface.co
8
Total runs
0
24-hour runs
2
3-day runs
1
7-day runs
3
30-day runs
More Information About FLAN-OPT-6.7b-LoRA huggingface.co Model
FLAN-OPT-6.7b-LoRA huggingface.co
FLAN-OPT-6.7b-LoRA huggingface.co is an AI model on huggingface.co that provides FLAN-OPT-6.7b-LoRA's model effect (), which can be used instantly with this crumb FLAN-OPT-6.7b-LoRA model. huggingface.co supports a free trial of the FLAN-OPT-6.7b-LoRA model, and also provides paid use of the FLAN-OPT-6.7b-LoRA. Support call FLAN-OPT-6.7b-LoRA model through api, including Node.js, Python, http.
FLAN-OPT-6.7b-LoRA huggingface.co is an online trial and call api platform, which integrates FLAN-OPT-6.7b-LoRA's modeling effects, including api services, and provides a free online trial of FLAN-OPT-6.7b-LoRA, you can try FLAN-OPT-6.7b-LoRA online for free by clicking the link below.
crumb FLAN-OPT-6.7b-LoRA online free url in huggingface.co:
FLAN-OPT-6.7b-LoRA is an open source model from GitHub that offers a free installation service, and any user can find FLAN-OPT-6.7b-LoRA on GitHub to install. At the same time, huggingface.co provides the effect of FLAN-OPT-6.7b-LoRA install, users can directly use FLAN-OPT-6.7b-LoRA installed effect in huggingface.co for debugging and trial. It also supports api for free installation.