📄 llms-txt.md

← Vault

Unsloth - Llms-Txt

Pages: 136


!pip install huggingface_hub hf_transfer

URL: llms-txt#!pip-install-huggingface_hub-hf_transfer

import os

os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"

from huggingface_hub import snapshot_download

snapshot_download(

repo_id = "unsloth/Llama-4-Scout-17B-16E-Instruct-GGUF",

local_dir = "unsloth/Llama-4-Scout-17B-16E-Instruct-GGUF",

allow_patterns = ["IQ2_XXS"],

)

bash

./llama.cpp/llama-cli \

--model unsloth/Llama-4-Scout-17B-16E-Instruct-GGUF/Llama-4-Scout-17B-16E-Instruct-UD-IQ2_XXS.gguf \

--threads 32 \

--ctx-size 16384 \

--n-gpu-layers 99 \

-ot ".ffn_.*_exps.=CPU" \

--seed 3407 \

--prio 3 \

--temp 0.6 \

--min-p 0.01 \

--top-p 0.9 \

-no-cnv \

--prompt "<|header_start|>user<|header_end|>\n\nCreate a Flappy Bird game.<|eot|><|header_start|>assistant<|header_end|>\n\n"

`

{% hint style="success" %}

Read more on running Llama 4 here:

{% endhint %}

Examples:

Example 1 (unknown):

`unknown

And let's do inference!

{% code overflow="wrap" %}

`


First uninstall xformers installed by previous libraries

URL: llms-txt#first-uninstall-xformers-installed-by-previous-libraries

pip uninstall xformers -y


(1) Saving to GGUF / merging to 16bit for vLLM

URL: llms-txt#(1)-saving-to-gguf-/-merging-to-16bit-for-vllm


Qwen3-Coder: How to Run Locally

URL: llms-txt#qwen3-coder:-how-to-run-locally

Contents:

To install Unsloth locally via Pip, follow the steps below:

Recommended installation:

Install with pip (recommended) for the latest pip release:

To install the latest main branch of Unsloth:

If you're installing Unsloth in Jupyter, Colab, or other notebooks, be sure to prefix the command with !. This isn't necessary when using a terminal

{% hint style="info" %}

Python 3.13 is now supported!

{% endhint %}

Uninstall + Reinstall

If you're still encountering dependency issues with Unsloth, many users have resolved them by forcing uninstalling and reinstalling Unsloth:

Advanced Pip Installation

{% hint style="warning" %}

Do NOT use this if you have Conda.

{% endhint %}

Pip is a bit more complex since there are dependency issues. The pip command is different for torch 2.2,2.3,2.4,2.5 and CUDA versions.

For other torch versions, we support torch211, torch212, torch220, torch230, torch240 and for CUDA versions, we support cu118 and cu121 and cu124. For Ampere devices (A100, H100, RTX3090) and above, use cu118-ampere or cu121-ampere or cu124-ampere.

For example, if you have torch 2.4 and CUDA 12.1, use:

Another example, if you have torch 2.5 and CUDA 12.4, use:

Or, run the below in a terminal to get the optimal pip installation command:

Or, run the below manually in a Python REPL:

Examples:

Example 1 (bash):

`bash

pip install unsloth

`

Example 2 (bash):

`bash

pip uninstall unsloth unsloth_zoo -y && pip install --no-deps git+https://github.com/unslothai/unsloth_zoo.git && pip install --no-deps git+https://github.com/unslothai/unsloth.git

`

Example 3 (bash):

`bash

pip install --upgrade --force-reinstall --no-cache-dir --no-deps git+https://github.com/unslothai/unsloth.git

pip install --upgrade --force-reinstall --no-cache-dir --no-deps git+https://github.com/unslothai/unsloth-zoo.git

`

Example 4 (bash):

`bash

pip install --upgrade pip

pip install "unsloth[cu121-torch240] @ git+https://github.com/unslothai/unsloth.git"

`