Downloads · 30 days
0
shahules786/Redpajama-3B-orcastyle
Redpajama-3B-orcastyle is a machine learning model from shahules786. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
- Dataset used: Explanation style datasets from psmathur/WizardLMOrca and Dahoas/cotgsm8k - Techniques: fp16 bit precision training + LoRA + DeepSpeed - Machine: V100 (16GB) 2
Downloads · 30 days
0
Access
Public
Updated Jul 2, 2023
Repo size
5.3 MB
Likes
3
Public
Click a slice to open those files.
.bin5.3 MB · 71%
From the Hugging Face model README
from peft import PeftModel
from huggingface_hub import hf_hub_download
from transformers import GPTNeoForCausalLM, AutoTokenizer
import json
model_name = "shahules786/Redpajama-3B-orcastyle"
config = hf_hub_download(repo_id=model_name, filename="adapter_config.json", local_dir=".")
config = json.load(open("adapter_config.json"))
base_model = config["base_model_name_or_path"]
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = GPTNeoForCausalLM.from_pretrained(base_model)
model.resize_token_embeddings(len(self.tokenizer))
model = PeftModel.from_pretrained(model, model_name).eval()
tokenizer.padding_side = "left"
inputs = tokenizer("This is a sample run", return_tensors="pt")
model.generate(**inputs)
Checkout training and inference code here