Suikasxt / PMG

The repository of paper Personalized Multimodal Response Generation with Large Language Models
6 stars 0 forks source link

PMG

This is the official mindspore implementation of our paper: PMG: Personalized Multimodal Generation with Large Language Models, Xiaoteng Shen, Rui Zhang, Xiaoyan Zhao, Jieming Zhu, Xi Xiao. In WWW 2024.

Introduction

This paper proposes the first method for personalized multimodal generation using LLMs, showcases its applications and validates its performance via an extensive experimental study on two datasets. The proposed method, Personalized Multimodal Generation (PMG for short) first converts user behaviors (e.g., clicks in recommender systems or conversations with a virtual assistant) into natural language to facilitate LLM understanding and extract user preference descriptions. Such user preferences are then fed into a generator, such as a multimodal LLM or diffusion model, to produce personalized content.

Environment Requirements

Quick Start

Script and Sample Code

.
├── checkpoint_download
│   ├── clip                        # checkpoints of clip
│   └── llama2                      # checkpoints of llama2
├── clip                            # CLIP implemented by MindSpore
├── stable_diffusion_v2             # Stable Diffusion implemented by MindSpore
├── config                          # config of llama
├── data
│   ├── movie                       # Validation datasets
│   └── raw_data
│       └── ml-latest-small         # Dataset movielens
├── inference.py                    # Implement of PMG
├── main.css                        # Demo css
├── main.py                         # Demo
├── overview.png
├── PMG_utils.py
├── prompts.py                      # Prompts
├── readme.md
├── requirements.txt
└── soft_prompt.py                   # Implement of soft prompt