Downloads · 30 days
164
0% of all-time downloads
Waterhorse/chessgpt-base-v1
chessgpt-base-v1 is a text generation model from Waterhorse. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Chessgpt-Base-v1 is the base model of Chessgpt.
Downloads · 30 days
164
0% of all-time downloads
All-time downloads
95.5K
Public
Repo size
22.5 GB
Likes
7
Public
Click a slice to open those files.
.bin11.2 GB · 100%
From the Hugging Face model README
Chessgpt-Base-v1 is the base model of Chessgpt.
Also, we are actively working on the development of the next-generation model, ChessGPT-V2. We welcome any contribution, especially on chess related dataset. For related matters, please contact [email protected].
This requires a GPU with 8GB memory.
import torch
import transformers
from transformers import AutoTokenizer, AutoModelForCausalLM
MIN_TRANSFORMERS_VERSION = '4.25.1'
# check transformers version
assert transformers.__version__ >= MIN_TRANSFORMERS_VERSION, f'Please upgrade transformers to version {MIN_TRANSFORMERS_VERSION} or higher.'
# init
tokenizer = AutoTokenizer.from_pretrained("Waterhorse/chessgpt-base-v1")
model = AutoModelForCausalLM.from_pretrained("Waterhorse/chessgpt-base-v1", torch_dtype=torch.float16)
model = model.to('cuda:0')
# infer
# Conversation between two
prompt = "Q: 1.e4 c5, what is the name of this opening?A:"
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)
Excluded uses are described below.
chessgpt-base-v1 is mainly for research on large language model, especially for those research about policy learning and language modeling.
chessgpt-base-v1 is a language model trained on chess related data and may not perform well for other use cases beyond chess domain.
Just as with any language model, chessgpt-base-v1 carries inherent limitations that necessitate careful consideration. Specifically, it may occasionally generate responses that are irrelevant or incorrect, particularly when tasked with interpreting complex or ambiguous queries. Additionally, given that its training is rooted in online data, the model may inadvertently reflect and perpetuate common online stereotypes and biases.
Please refer to our paper and codefor benchmark results.
@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}
}