Just a way to sample moods of an end-uesr using generic data from the Google GEMENI API
Developed by: [More Information Needed] inferencetrainingAI, Vultr.com & GitLab, Google Colab, AWS
Funded by [optional]: [More Information Needed] Crystal P & Emmanuel Nsanga, Roy Kwan
Shared by [optional]: [More Information Needed]
Model type: Peft Model
Language(s) (NLP): [More Information Needed]
License: MIT
Finetuned from model [optional]: EleutherAI 1.3B
Model Sources [optional]
Repository: [More Information Needed]
Paper [optional]: [More Information Needed]
Demo [optional]: [More Information Needed]
Training file included
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
from peft import PeftModel, PeftConfig
import gc
gc.collect()
model_name = "MoodChartAI/basicmood"
adapters_name = "MoodChartAI/basicmood"
torch.cuda.empty_cache()
os.system("sudo swapoff -a; swapon -a")
print(f"Starting to load the model {model_name} into memory")
m = AutoModelForCausalLM.from_pretrained(
model_name,
#load_in_4bit=True,
).to(device='cpu:7')
print(f"Loading the adapters from {adapters_name}")
m = PeftModel.from_pretrained(m, adapters_name)
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-1.3B", trust_remote_code=True)
while True:
mood_input = input("Mood: ")
inputs = tokenizer("Prompt: %s Completions: You're feeling"%mood_input, return_tensors="pt", return_attention_mask=True)
inputs.to(device='cpu:8')
outputs = m.generate(**inputs, max_length=12)
print(tokenizer.batch_decode(outputs)[0])
Uses
Direct Use
[More Information Needed]
Downstream Use [optional]
[More Information Needed]
Out-of-Scope Use
[More Information Needed]
Bias, Risks, and Limitations
[More Information Needed]
Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.