🚀 國際象棋GPT聊天版v1
國際象棋GPT聊天版v1是國際象棋GPT基礎版v1經過監督微調(SFT)的模型。它能為國際象棋相關的研究和應用提供更精準的語言交互能力,推動國際象棋領域的智能化發展。
此外,我們正在積極開發下一代模型國際象棋GPT - V2。歡迎各方貢獻,特別是在國際象棋相關數據集方面。如有相關事宜,請聯繫 xidong.feng.20@ucl.ac.uk。
✨ 主要特性
- 模型類型:語言模型
- 支持語言:英語
- 許可證:Apache 2.0
- 模型描述:一個具有28億參數的國際象棋預訓練語言模型。
📦 安裝指南
此模型推理需要一個顯存為8GB的GPU。
import torch
import transformers
from transformers import AutoTokenizer, AutoModelForCausalLM
MIN_TRANSFORMERS_VERSION = '4.25.1'
assert transformers.__version__ >= MIN_TRANSFORMERS_VERSION, f'請將transformers升級到{MIN_TRANSFORMERS_VERSION}或更高版本。'
tokenizer = AutoTokenizer.from_pretrained("Waterhorse/chessgpt-chat-v1")
model = AutoModelForCausalLM.from_pretrained("Waterhorse/chessgpt-chat-v1", torch_dtype=torch.float16)
model = model.to('cuda:0')
prompt = "A friendly, helpful chat between some humans.<|endoftext|>Human 0: 1.e4 c5, what is the name of this opening?<|endoftext|>Human 1:"
inputs = tokenizer(prompt, return_tensors='pt').to(model.device)
input_length = inputs.input_ids.shape[1]
outputs = model.generate(
**inputs, max_new_tokens=128, do_sample=True, temperature=0.7, top_p=0.7, top_k=50, return_dict_in_generate=True,
)
token = outputs.sequences[0, input_length:]
output_str = tokenizer.decode(token)
print(output_str)
📚 詳細文檔
使用範圍
以下是排除的使用場景說明。
直接使用
國際象棋GPT聊天版v1
主要用於大語言模型的研究,特別是那些關於策略學習和語言建模的研究。
非適用場景
國際象棋GPT聊天版v1
是基於國際象棋相關數據訓練的語言模型,對於國際象棋領域之外的其他用例可能表現不佳。
偏差、風險和侷限性
與任何語言模型一樣,國際象棋GPT聊天版v1存在一些固有的侷限性,需要謹慎考慮。具體來說,它偶爾可能會生成不相關或不正確的回覆,尤其是在處理複雜或模糊的查詢時。此外,由於其訓練基於在線數據,該模型可能會無意中反映和延續常見的網絡刻板印象和偏差。
評估
請參考我們的論文和代碼獲取基準測試結果。
引用信息
@article{feng2023chessgpt,
title={ChessGPT: Bridging Policy Learning and Language Modeling},
author={Feng, Xidong and Luo, Yicheng and Wang, Ziyan and Tang, Hongrui and Yang, Mengyue and Shao, Kun and Mguni, David and Du, Yali and Wang, Jun},
journal={arXiv preprint arXiv:2306.09200},
year={2023}
}
📄 許可證
本模型使用的是Apache 2.0許可證。