trainable agents

Report Abuse

Basic Information

This repository is the official codebase and resource release for the EMNLP 2023 paper 'Character-LLM: A Trainable Agent for Role-Playing'. It provides an end-to-end pipeline to create, train, and run role-specific, trainable language agents that emulate historical or fictional characters using a proposed Experience Reconstruction data generation process. The repo includes training datasets, scripts to generate and parse scene and dialogue data with external LLMs, instructions to assemble model weights from published delta checkpoints, training recipes based on FastChat, and inference server examples for serving models as chatbots. Nine prebuilt character models and associated dataset statistics are provided. The materials are intended for academic research and reproduce experiments described in the paper. Documentation describes dataset formats, data generation steps, SFT training commands, inference server startup, and example single- and multi-turn interview scripts for qualitative evaluation.

Links

Categorization

App Details

Features
Experience Reconstruction data generation that converts character profiles into diverse scene and interaction data using an external LLM. Published training datasets for nine characters with per-character statistics and both raw generated and prompted formats for supervised fine-tuning. Released weight differences for nine character checkpoints so users can recover full model weights from base Llama models. Data generation and parsing scripts such as run_api_gen_data.py and multiple parser scripts to produce training-ready JSON. Training integration with FastChat including a provided train_mem.py training command and recommended hyperparameters and distributed training flags. Inference orchestration examples using FastChat controller, OpenAI-format API server, and model_worker processes. Utility scripts for converting generated data to SFT format and example single-turn and multi-turn interview evaluation scripts.
Use Cases
This repository helps researchers and practitioners reproduce and extend experiments on trainable role-playing agents by delivering datasets, model checkpoints as deltas, and full training and serving instructions. It saves time by providing data generation, parsing, and conversion tooling to build character-specific dialogue datasets and protective scenes to mitigate hallucination. The FastChat-backed training and inference recipes demonstrate how to prepare base Llama models, apply delta checkpoints, run multi-GPU SFT training, and deploy model workers and API servers for single-turn and multi-turn interactions. Provided example scripts and generated sample outputs support qualitative evaluation and benchmarking. The README also documents compute expectations and licensing constraints, and it emphasizes that resources are for academic research use only and that output quality can be variable.

Please fill the required fields*