
    oi)                     N   S SK r S SKrS SKrS SKJr  S SKrS SKrS SKrS SKrS SK	r	S SK
rS\R                  S'   / SQr\ V s/ s H  o \R                  ;   d  M  U PM     sn rSSKJrJrJrJrJr  \" 5         \" 5         \" 5         \" 5         \" 5         CCCCC\(       a$  \ R,                  " SS	R/                  \5       S
3SS9  CCS\R                  S'   S SKJr  S SKJr   \" S5      r\" \5      \" S5      :  a  \" S5        S SKrCC S SK r S SK"J#r#J$r$J%r%J&r&J'r'J(r(  SSKJ)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2J3r3J4r4  \)" 5         \*" 5         \+" 5         \," 5         \-" 5         \." 5         \/" 5         \0" 5         \1" 5         \2" 5         \3" 5         \4" 5         C)C*C+C,C-C.C/C0C1C2C3C4\%S:X  a  \ Rj                  Rm                  5       u  r7r8\7S:  r9\ Rj                  Rt                  r;S\<" \Rz                  " \;5      5      ;   a  S4S jr:\:\ Rj                  l:        OS r:\:\ Rj                  l:        C7C8OA\%S:X  a  \ Rj                  Ru                  5       r9O \%S:X  a  \ R|                  Ru                  5       r9S SK?r?\%S:X  a\  S r@\" \?R                  5      \" S 5      :  a   S S!KBJ@r@  OS S!KCJ@r@   S SKDrE \ER                  R                  R                  rH\@" 5         C@O\%S:X  a  O\%S:X  a  S SKDrE SS0KZ7  SS1KZJArA  SS0K[7  SS0K\7  SS0K]7  SS0K^7  SS2K_J`r`Jara  S S3KbJcrcJdrdJereJfrfJgrgJhrh  \i" 5         gs  sn f ! \ a	    \" S5      e  e = f! \! a	    \" S5      e  e = f!    N= f!   \" S"5        SrE N= f!   \ R,                  " S#5        \R                  R                  S$5      (       a  \R                  " S%5        GO^\R                  R                  S&5      (       Ga=  \R                  " / S'Q5      R                  S(5      R                  S)5      rO\R                  " S*5      rQ\O Vs/ s H  n\QR                  U5      PM     Os  snf snrO\O Vs/ s H  oc  M  UR                  S5      PM     Os  snf snrO\T" \O5      S :X  a  \R                  " S+5        O\R                  " S,5      rU\R                  " \O Vs/ s H)  n\W" \UR                  U5      R                  S5      5      PM+     Os  snf sn5      SSS-2   S    rX\O\X   rX\R                  " S+\X 35        CUCXCOCQ\Eb  \R                  " \E5        \R                  " \?5         S. r@\" \?R                  5      \" S 5      :  a   S S!KBJ@r@  O!    O	= fS S!KCJ@r@  \ER                  R                  R                  rH\@" 5          GN!   \ R,                  " S/5          GN= f= f)5    N)Version1UNSLOTH_IS_PRESENT)trltransformerspeft   )fix_message_factory_issuecheck_fbgemm_gpu_versiontorchvision_compatibility_checkfix_diffusers_warningsfix_huggingface_hubz,WARNING: Unsloth should be imported before [z, z] to ensure all optimizations are applied. Your code may run slower or encounter memory issues without these optimizations.

Please restructure your imports with 'import unsloth' at the top of your file.   )
stacklevelpython&PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION)version)PackageNotFoundErrorunsloth_zooz2026.1.2zUnsloth: Please update Unsloth and Unsloth-Zoo to the latest version!
Do this via `pip install --upgrade --force-reinstall --no-cache-dir --no-deps unsloth unsloth_zoo`zMUnsloth: Please install unsloth_zoo via `pip install unsloth_zoo` then retry!zyUnsloth: Pytorch is not installed. Go to https://pytorch.org/.
We have some installation instructions on our Github page.)is_hipget_device_typeDEVICE_TYPEDEVICE_TYPE_TORCHDEVICE_COUNTALLOW_PREQUANTIZED_MODELS)fix_xformers_performance_issuefix_vllm_aimv2_issuefix_vllm_guided_decoding_paramsfix_vllm_pdl_blackwellignore_logger_messagespatch_ipykernel_hf_xetpatch_trackiopatch_datasets patch_enable_input_require_gradsfix_openenv_no_vllmfix_executorchpatch_vllm_for_notebookscuda   including_emulationc                     [        U 5      $ N)old_is_bf16_supported)r*   s    J/home/james-whalen/.local/lib/python3.13/site-packages/unsloth/__init__.pyis_bf16_supportedr/      s    ()<==    c                      [         $ r,   )SUPPORTS_BFLOAT16 r0   r.   r/   r/      s    $$r0   hipxpuc                      g r,   r3   r3   r0   r.   <lambda>r7      s    4r0   z3.0.0)libcuda_dirszeUnsloth: `bitsandbytes` is not installed - 4bit QLoRA unallowed, but 16bit and full finetuning works!z;Unsloth: Running `ldconfig /usr/lib64-nvidia` to link CUDA.z/usr/lib64-nvidiazldconfig /usr/lib64-nvidia
/usr/local)lsz-alr9   zutf-8
z[\s](cuda\-[\d\.]{2,})$zldconfig /usr/local/z([\d\.]{2,})c                      g r,   r3   r3   r0   r.   r7   r7      s    4r0   a  Unsloth: CUDA is not linked properly.
Try running `python -m bitsandbytes` then `python -m xformers.info`
We tried running `ldconfig /usr/lib64-nvidia` ourselves, but it didn't work.
You need to run in your terminal `sudo ldconfig /usr/lib64-nvidia` yourself, then import Unsloth.
Also try `sudo ldconfig /usr/local/cuda-xx.x` - find the latest cuda version.
Unsloth will still run for now, but maybe it might crash - let's hope it works!)*)__version__)RawTextDataLoaderTextPreprocessor)check_python_modulescreate_locked_down_functionexecute_with_time_limitBenchmarkeris_port_openlaunch_openenv)F)jwarnings	importlibsyspackaging.versionr   osre
subprocessinspect	functoolsnumpynpenvironcritical_modulesmodulesalready_importedimport_fixesr
   r   r   r   r   warnjoinimportlib.metadatar   importlib_versionr   unsloth_zoo_versionprintr   ImportErrortorchModuleNotFoundErrorunsloth_zoo.device_typer   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   get_device_capabilitymajor_versionminor_versionr2   r/   r-   str	signaturer5   tritonr8   r?   triton.backends.nvidia.drivertriton.common.buildbitsandbytesbnb
functionallibcdequantize_blockwise_fp32pathexistssystemcheck_outputdecodesplitpossible_cudascompile	find_cudasearchgrouplenfind_numberargsortfloatlatest_cudareloadmodelssavechat_templatestokenizer_utilstrainerdataprep.raw_textr@   rA   unsloth_zoo.rl_environmentsrB   rC   rD   rE   rF   rG   _patch_trl_trainer)modxs   00r.   <module>r      s~      % - - -  $'

   3 #3J#3Cckk7IC#3J        !    #  MM
6tyyAQ7R6S TY 	Z  & 8@

3 4 < 3
+M:"#gj&99q	
  +
           !            "      "#$ &#(::#C#C#E M=%*!JJ88G$5$56K$L MM	> (9

$	% (9

$}E

446E 		335 &Lv!!"gg&66	B 	5"6%(^^%7%7%R%R"j 	EE 	       C   c KN  

W 
	  
	E 
	p	s	
 3ST77>>-..II23WW^^L)) ''(CDt 
 

#=>I;IJ>ai..q1>JN2@R.Qjaggaj.RN >"a'		01 jj9 jjDRSNqU;--a066q9:NSB$ -[9		0>?	?S! 	'Lv))*gg.>>J<),););)V)V&N	MMb s   LL!&L 
L2 M M  'M L/2MM	MB1V$P*)V$6Q QA
V$0S
AV$+V	UV	U2V		V!V$!V$