Build OSG AI for class submission
Prerequisites:
- Obtain the Operating system knowledge from the text books
- Provide some knowledge to users about operating system of the class OSG
- English is required. Vietnamese is optional.
- An NVIDIA GPU with Studio driver installed and above version 550.
- Minimum available memory (not total memory and exclude swap memory) is 12gb.
- A GNU/Linux operating system that run based-on AMD64 architecture.
- Anaconda (or Miniconda) environment. You can download from here.
Note for WSL2 users:
- NVIDIA GPU should not be installed normally within the distro, since installing the actual driver requires the Linux header (
linux-headers), which is not available in the WSL. Instead, please review Getting Started with CUDA on WSL 2- In
.wslconfig, please enable GPU settings (set totrueordefault) andmemoryin the Main WSL Settings
To pull all models, and submodules for tunning the LLM, using
git clone https://github.com/anhvlt-2k6/osg-ai.git
cd osg-ai
git submodule update --init --recursive
cd osg-ai && git lfs fetch --allImport and create a new conda environment using this command
cd ..
conda env create -f .envs/anaconda-env-linux.yamlThen wait until the environment is ready. Once it's done, running
conda activate osg-aiAfter that, prepare docling of the conda environment
docling-tools models downloadTo avoid using CPU from tunning the LLM, run
cd prepare-env
python3 test_gpu.pyIf it shows something like...
GPU is available: .......then it is good to see. However, if it shows
Only CPU is availableThen you should stop from doing the next step. In that case, review your Linux distro or WSL instance.
cd ../training-parse
python3 train.py
python3 convert.pyThe output model is in ./osg-ai/osg-ai.gguf
The repo follows the Apache License