Edit model card

Machine Mindset: An MBTI Exploration of Large Language Models

If you like our project, please give us a star ⭐

[ English | 中文 | 日本語 ]

Introduction

MM_en_INTP (Machine_Mindset_en_INTP) is an English large language model developed through a collaboration between FarReel AI Lab and Peking University Deep Research Institute, based on Llama2-7b-chat-hf with an MBTI personality type of INTP.

MM_en_INTP has undergone extensive training, including the creation of a large-scale MBTI dataset, multi-stage fine-tuning, and DPO training. We are committed to continuously updating the model to improve its performance and regularly supplementing it with test data. This repository serves as the storage for the MM_en_INTP model.

The foundational personality trait of MM_en_INTP (Machine_Mindset_en_INTP) is INTP. Detailed characteristics can be found in 16personalities.

If you would like to learn more about the Machine_Mindset open-source model, we recommend that you visit the GitHub repository for additional details.

Requirements

  • python 3.8 and above
  • pytorch 1.12 and above, 2.0 and above are recommended
  • CUDA 11.4 and above are recommended (this is for GPU users, flash-attention users, etc.)

Quickstart

  • Using the HuggingFace Transformers library (single-turn dialogue):

    import torch
    from transformers import AutoModelForCausalLM, AutoTokenizer
    from transformers.generation.utils import GenerationConfig
    
    tokenizer = AutoTokenizer.from_pretrained("FarReelAILab/Machine_Mindset_en_INTP", use_fast=False, trust_remote_code=True)
    model = AutoModelForCausalLM.from_pretrained("FarReelAILab/Machine_Mindset_en_INTP", device_map="auto", torch_dtype=torch.float16, trust_remote_code=True)
    model.generation_config = GenerationConfig.from_pretrained("FarReelAILab/Machine_Mindset_en_INTP")
    
    messages = []
    messages.append({"role": "user", "content": "What is your MBTI personality type?"})
    response = model.chat(tokenizer, messages)
    print(response)
    
    messages.append({'role': 'assistant', 'content': response})
    messages.append({"role": "user", "content": "After spending a day with a group of people, how do you feel when you return home?"})
    response = model.chat(tokenizer, messages)
    print(response)
    
  • Using the HuggingFace Transformers library (multi-turn dialogue):

    import torch
    from transformers import AutoModelForCausalLM, AutoTokenizer
    from transformers.generation.utils import GenerationConfig
    tokenizer = AutoTokenizer.from_pretrained("FarReelAILab/Machine_Mindset_en_INTP", use_fast=False, trust_remote_code=True)
    model = AutoModelForCausalLM.from_pretrained("FarReelAILab/Machine_Mindset_en_INTP", device_map="auto", torch_dtype=torch.float16, trust_remote_code=True)
    model.generation_config = GenerationConfig.from_pretrained("FarReelAILab/Machine_Mindset_en_INTP")
    messages = []
    print("####Enter 'exit' to exit.")
    print("####Enter 'clear' to clear the chat history.")
    while True:
        user=str(input("User:"))
        if user.strip()=="exit":
            break
        elif user.strip()=="clear":
            messages=[]
            continue
        messages.append({"role": "user", "content": user})
        response = model.chat(tokenizer, messages)
        print("Assistant:", response)
        messages.append({"role": "assistant", "content": str(response)})
    
  • Use LLaMA-Factory (multi-round conversation)

    git clone https://github.com/hiyouga/LLaMA-Factory.git
    cd LLaMA-Factory
    python ./src/cli_demo.py \
          --model_name_or_path /path_to_your_local_model \
          --template llama2
    

For more information, please refer to our GitHub repo.

Citation

If you find our work helpful, feel free to give us a cite.

@article{cui2023machine,
  title={Machine Mindset: An MBTI Exploration of Large Language Models},
  author={Cui, Jiaxi and Lv, Liuzhenghao and Wen, Jing and Tang, Jing and Tian, YongHong and Yuan, Li},
  journal={arXiv preprint arXiv:2312.12999},
  year={2023}
}

License Agreement

Our code follows the Apache 2.0 open-source license. Please check LICENSE for specific details regarding the open-source agreement.

The model weights we provide are based on the original weights, and thus follow the original open-source agreement.

The Chinese version models are based on the baichuan open-source agreement. It is suitable for commercial use. You can refer to model_LICENSE for specific details.

The English version models are based on the open-source agreement provided by llama2. You can refer to llama2 open-source license.

Contact Us

Feel free to send an email to [email protected], [email protected]

Downloads last month
69
Inference Examples
Inference API (serverless) has been turned off for this model.