Low-rank adapters (r=16) finetuned over 4.2m 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.77 and an eval ppl of 4.19.
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-1.3b-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_k=4,
penalty_alpha=0.6
)
print("\n".join(tokenizer.decode(outputs[0]).split("\n")[:prompt.count("\n")+1]))
# Cessna is a type of aircraft. Space is beyond the reach of Cessna. The answer is no.
Runs of crumb FLAN-OPT-1.3b-LoRA on huggingface.co
11
Total runs
0
24-hour runs
-3
3-day runs
-5
7-day runs
-1
30-day runs
More Information About FLAN-OPT-1.3b-LoRA huggingface.co Model
FLAN-OPT-1.3b-LoRA huggingface.co
FLAN-OPT-1.3b-LoRA huggingface.co is an AI model on huggingface.co that provides FLAN-OPT-1.3b-LoRA's model effect (), which can be used instantly with this crumb FLAN-OPT-1.3b-LoRA model. huggingface.co supports a free trial of the FLAN-OPT-1.3b-LoRA model, and also provides paid use of the FLAN-OPT-1.3b-LoRA. Support call FLAN-OPT-1.3b-LoRA model through api, including Node.js, Python, http.
FLAN-OPT-1.3b-LoRA huggingface.co is an online trial and call api platform, which integrates FLAN-OPT-1.3b-LoRA's modeling effects, including api services, and provides a free online trial of FLAN-OPT-1.3b-LoRA, you can try FLAN-OPT-1.3b-LoRA online for free by clicking the link below.
crumb FLAN-OPT-1.3b-LoRA online free url in huggingface.co:
FLAN-OPT-1.3b-LoRA is an open source model from GitHub that offers a free installation service, and any user can find FLAN-OPT-1.3b-LoRA on GitHub to install. At the same time, huggingface.co provides the effect of FLAN-OPT-1.3b-LoRA install, users can directly use FLAN-OPT-1.3b-LoRA installed effect in huggingface.co for debugging and trial. It also supports api for free installation.