Model Card for Qwen2-Instruct-7B-COIG-P

This model, Qwen2-Instruct-7B-COIG-P, is a 7B parameter large language model fine-tuned for instruction following, particularly within the Chinese language domain. It's based on the Qwen-2 architecture and trained using the COIG-P dataset, focusing on aligning the model's output with human preferences.

Model Details

Model Description

This repository contains the Qwen2-Instruct-7B-COIG-P model described in the paper COIG-P: A High-Quality and Large-Scale Chinese Preference Dataset for Alignment with Human Values. This model excels at generating text responses in Chinese according to user instructions.

  • Developed by: [More Information Needed - Add developer/organization details]
  • Funded by [optional]: [More Information Needed - Add funding source information]
  • Shared by [optional]: m-a-p
  • Model type: Large Language Model (LLM)
  • Language(s) (NLP): Chinese (zh)
  • License: Apache 2.0
  • Finetuned from model [optional]: [More Information Needed - Add base model details]

Model Sources

Uses

Direct Use

This model can be used directly for text generation tasks in Chinese. Users can provide instructions or prompts, and the model will generate corresponding text outputs.

Downstream Use [optional]

This model can be fine-tuned for various downstream tasks such as question answering, text summarization, and translation, specifically within the Chinese language context.

Out-of-Scope Use

This model may not perform well on tasks requiring knowledge outside of the domain covered by the COIG-P dataset. Its performance in languages other than Chinese is also expected to be limited.

Bias, Risks, and Limitations

[More Information Needed - Add information on biases, risks, and limitations. Consider potential biases in the training data and the model's potential for generating harmful or inappropriate content.]

Recommendations

[More Information Needed - Add recommendations to mitigate biases, risks, and limitations]

How to Get Started with the Model

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

device = "cuda" if torch.cuda.is_available() else "cpu"
model = AutoModelForCausalLM.from_pretrained("m-a-p/Qwen2-Instruct-7B-COIG-P", trust_remote_code=True, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("m-a-p/Qwen2-Instruct-7B-COIG-P")

prompt = "Give me a short introduction to large language models."
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([text], return_tensors="pt").to(device)

generated_ids = model.generate(model_inputs.input_ids, max_new_tokens=512)
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)

Training Details

Training Data

[More Information Needed - Add details about the training data, linking to the Hugging Face dataset card if applicable. The dataset used is COIG-P: https://huggingface.co/datasets/m-a-p/COIG-P]

Training Procedure

[More Information Needed - Add details about the training procedure, including pre-processing steps and hyperparameters.]

Training Hyperparameters

  • Training regime: [More Information Needed]

Speeds, Sizes, Times [optional]

[More Information Needed]

Evaluation

Testing Data, Factors & Metrics

[More Information Needed - Detail the evaluation setup, including datasets, factors, and metrics used.]

Results

[More Information Needed - Present the evaluation results.]

Summary

[More Information Needed - Summarize the evaluation results.]

Model Examination [optional]

[More Information Needed]

Environmental Impact

[More Information Needed - Estimate and report the environmental impact of training this model.]

Technical Specifications [optional]

Model Architecture and Objective

[More Information Needed]

Compute Infrastructure

[More Information Needed]

Hardware

[More Information Needed]

Software

[More Information Needed]

Citation [optional]

BibTeX:

@misc{pteam2025coigphighqualitylargescalechinese,
      title={COIG-P: A High-Quality and Large-Scale Chinese Preference Dataset for Alignment with Human Values}, 
      author={P Team and Siwei Wu and Jincheng Ren and Xinrun Du and Shuyue Guo and Xingwei Qu and Yiming Liang and Jie Liu and Yunwen Li and Tianyu Zheng and Boyu Feng and Huaqing Yuan and Zenith Wang and Jiaheng Liu and Wenhao Huang and Chenglin Cai and Haoran Que and Jian Yang and Yuelin Bai and Zekun Moore Wang and Zhouliang Yu and Qunshu Lin and Ding Pan and Yuchen Jiang and Tiannan Wang and Wangchunshu Zhou and Shenzhi Wang and Xingyuan Bu and Minghao Liu and Guoyin Wang and Ge Zhang and Chenghua Lin},
      year={2025},
      eprint={2504.05535},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2504.05535}, 
}

APA:

[More Information Needed - Add APA citation]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Model Card Authors [optional]

[More Information Needed]

Model Card Contact

[More Information Needed]

Downloads last month
10
Safetensors
Model size
7.62B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including m-a-p/Qwen2-Instruct-7B-COIG-P