Views
No views yet
Transformers: Applications in Language and Communication
which is part of the Applied Data Science Master at Utrecht University.
More specifically, this model was made as part of the midterm assignment of this course.
For this assignment, only a free tier of Google Colab was allowed to train your model.
Additionally, the use of a pre-trained chess LLM was not permitted.| Dataset | Samples | Share |
|---|---|---|
| Lichess/chess-position-evaluations (depth ≥ 16) | 218,217 | 91.3% |
| Synthetic Stockfish games (1,000 simulated games) | 20,860 | 8.7% |
1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModel
3
4base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B")
5model = PeftModel.from_pretrained(base, "")
6tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-1.5B")
7
8fen = "rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1"
9inputs = tokenizer(fen, return_tensors="pt")
10output = model.generate(**inputs, max_new_tokens=8)
11print(tokenizer.decode(output[0], skip_special_tokens=True))