diff --git a/sia/llm_engine/qwq_infer.ipynb b/sia/llm_engine/qwq_infer.ipynb deleted file mode 100644 index 9f3ac61..0000000 --- a/sia/llm_engine/qwq_infer.ipynb +++ /dev/null @@ -1,282 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline, TextIteratorStreamer, BitsAndBytesConfig\n", - "from threading import Thread\n", - "import torch" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "model_path = \"/root/models/notebook\"" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [], - "source": [ - "quantization_config = BitsAndBytesConfig(\n", - " load_in_4bit=True,\n", - " bnb_4bit_compute_dtype=torch.bfloat16,\n", - " bnb_4bit_quant_type=\"nf4\",\n", - " bnb_4bit_use_double_quant=True\n", - ")" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "5f35aa01aafa4bc2beb19f437373945e", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Loading checkpoint shards: 0%| | 0/14 [00:00\n", - "\n", - "The word \"strawberry\" contains three 'r's. Here's the breakdown:\n", - "\n", - "1. **S** \n", - "2. **T** \n", - "3. **R** (first 'r') \n", - "4. **A** \n", - "5. **W** \n", - "6. **B** \n", - "7. **E** \n", - "8. **R** (second 'r') \n", - "9. **R** (third 'r') \n", - "10. **Y** \n", - "\n", - "So, **there are 3 'r's in \"strawberry\"**.<|im_end|>" - ] - } - ], - "source": [ - "for text in streamer:\n", - " print(text, end='')" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "train", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.12" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/tools/train/setup.py b/tools/train/setup.py index e54266d..26425d1 100644 --- a/tools/train/setup.py +++ b/tools/train/setup.py @@ -28,7 +28,7 @@ setup( 'transformers>=4.30.0', 'trl>=0.7.8', 'unsloth>=2025.3', - 'vllm>=0.8', + 'vllm=0.8.2', ], python_requires='>=3.10', )