Downloads · 30 days
11
37% of all-time downloads
yqq1231231/emotional_agent
emotional_agent is a machine learning model from yqq1231231. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains an RL-optimized chat model based on TinyLlama/TinyLlama-1.1B-Chat-v1.0.
Downloads · 30 days
11
37% of all-time downloads
All-time downloads
30
Public
Repo size
1.1 MB
Likes
0
Public
Click a slice to open those files.
.pt1.1 MB · 100%
From the Hugging Face model README
This repository contains an RL-optimized chat model based on TinyLlama/TinyLlama-1.1B-Chat-v1.0.
This model uses a DQN (Deep Q-Network) agent to select the best prompting strategy for a base language model.
from huggingface_hub import hf_hub_download
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
# 1. Download the RL model
rl_model_path = hf_hub_download(repo_id="yqq1231231/emotional_agent", filename="best_model.pt")
# 2. Load the base language model
base_model_name = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
base_model = AutoModelForCausalLM.from_pretrained(base_model_name)
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# 3. Load the RL model
rl_agent = torch.load(rl_model_path)
# Now you can use both models together!
This model was trained using reinforcement learning to optimize prompt selection for better responses.