--- title: Id2223 Lab2 emoji: 💬 colorFrom: yellow colorTo: purple sdk: gradio sdk_version: 5.0.1 app_file: app.py pinned: false --- This chatbot was created as part of the lab assignment in **ID2223 - Scalable Machine Learning**. The premise of the task was to finetune an existing model and to display it in the UI. Our basemodel is **unsloth/Llama-3.2-3B-Instruct**. Our hyperparameters for the fine tuning were: - r=4 - lora_alpha=8 - lora_dropout=0.8 Higher ranks or lower dropout rates led to massive overfitting which was explored through trial and error. The datasource used for the fine tuning was a chess dataset containing chess games and their respective average elo. The dataset can be found [here](https://huggingface.co/datasets/pjarbas312/chessllm). It roughly contains the same amount of data points as the FineTome 100k dataset. The idea is to fine tune the model so that it can recognize chess games and make predictions on them. The base model tends to hallucinate when given a chess game not understanding the context whilst the fine tuned version recognizes the chess game and guesses the elo. With chess gaining popularity and especially in the wake of the world chess championship it is a useful addition in our opinion. As the fine tuning takes some time and GPUs are not always available we checkpoint the progress after a certain amount of steps enabling us to resume the training if it was stopped abruptly. For the frontend we decided to use Gradio and its built-in components to display the chatbot. Additionally to the chatbot ui we integrated a chess chatbox which accepts chess games in the format displayed in the placeholder, as well as a chessboard which shows the moves that were played in that chess match. An example dataset containing chess moves can be found [here](https://huggingface.co/datasets/mlabonne/chessllm). **Screenshots of the UI**: The UI features the animation of the chess string that was put into the chess chatbox. Please note that the input must follow the format specified in the helper text. ![ui2](./UI/ui2.png) ![ui1](./UI/ui1.png)