• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Data Science

    ?? ?? ?? NVIDIA cuML? scikit-learn ?????

    Reading Time: 5 minutes

    ???? ???? ?? ?? ??? scikit-learn ?????? ??? API? ??? ????, pandas, NumPy ?? ?? ?? ??? ??????? ????? ???? ??? ??? ?????. ?? NVIDIA cuML? ?? ??????? ?? ?? ?? scikit-learn API? Python ?????? ??? ????? NVIDIA GPU? CUDA ??? ??? ? ????,

    NVIDIA cuML 25.02 ????? ?? ?? ?? scikit-learn ????? ????? ??? ?? ??? ?????. 2019? ?? ??? NVIDIA cuML? Python ????? ?? CUDA ?? GPU ????? ??? ??? ????. ?? ???? ?? ??? ???? ???? ????? ?? scikit-learn ??????? ???? ??? CPU ?? NVIDIA GPU?? ?? 50? ?? ?? ??? ??? ? ????. 

    ?? cuML? ??? ??? ?? ?? ? ??? ??? ???? ????? UMAP? HDBSCAN? ?????, ?? ?? ?? NVIDIA GPU?? CPU ?? ? ?? 60? ? 175?? ?? ??? ?????.

    ?? ?????? cuML? ?? ?? ?? ??? ??? ??? ????? ????, scikit-learn ??????? ?? ???? ??? ??? ?? ????????.

    ??

    CPU?? ???? ??? ???? ??? ?? ???? ? ?? ??? ? ????. ??? ?? ??? ?? ?? ?????? ??????? ?? ??? ????? ?? ???? ???? ???? ?????, ?????? ??? ???, ?? ??? ??? ??? ??? ?????.

    ?? cuML ???? DataFrame ??? ?? cuDF-pandas? ??? zero-code-change ??? ????? ???? ???? ????, ?? ?? ?? ?????? ? ??? ??????.

    ???? ??? ????? NVIDIA GPU? ???? ?????? ??? ??? ?? ??????? ?? ???? ????. ?? ??? ?????? ??, ?? ? ??? ?? ??? ??????.

     cuML? ??? zero-code-change(?? ?? ??) ??? ?? ?? scikit-learn ????? ?? ?? ??? ??? ? ????. cuML? ?? ??? ?? ??? NVIDIA GPU?? ???? ?????, ???? ?? ??? ???? CPU ???? ?????. ?? ?? ?????? ?? ??? ?? CPU?? ???? GPU? ?????, GPU?? ???? CPU? ??? ???? ???.

    ?? ?? ?????? ?? ????, k-Nearest Neighbors(k-NN), ??? ?? (Principal component analysis, PCA), k-?? ???? ??? ?? ?? ?? scikit-learn ????? ?? ?? ?? ?? ???? ?????. ???? ?? ????? ??? ?? ??? ??? What Does cuML-accel Accelerate? ??? ?????.? ??? ???? ???? ? ?? ???? ??? ????? ???? ????? ?? ?????.

    NVIDIA GPU?? ML ?????? ?? ??? ???? ?????? ??? CPU? GPU ?? ??? ??? ??????. ?? ???? GPU? ? ? ??? ?? ???, ML ?? ? ??? ??? ? ??? ??? ???? ?? ??? ???? ??? ? ????.?

    NumPy pandas ? scikit-learn? ???? CPU ?????? ????? ??? ?? ??? ?? cuPy, cuDF-pandas ? cuML? ?????. cuDF-pandas ? cuML zero-code-change ??? ?? ????? ???? ???? ???? ??????? ??? ???? ??????.

    ML ?? ?? ? ?? ??? ?? ???? CUDA-X ?????? ????? ? ??? ???? GPU?? ??? ? ????. 

    ?? ?? ?? ???? ???? ??? ???? ?? cuML ?????? Forest Inference Library (FIL) ??? ??? ? ????. ??? NVIDIA Triton ?? ??? ?? ???? ???? ???? AI ??? ???? ??? ? ????. 

    scikit-learn? ?? cuML ?? ?? ?? ?? ???? 

    cuML ?? ?? ?? ??? cuml.accel ??? ?? ?????. ? ??? ????? scikit-learn ?? ?? ???? ???? ???? ? ?? ??? ??? ????? ??? ???? ??????.  

    ??? ??? ??? ?? ??? ???? ?? cuML? ?? NVIDIA GPU?? ????, ??? ?? ???? CPU ?? scikit-learn ???? ?????. ??(GPU)? ???(CPU) ??? ?? ???? scikit-learn? ????? ???? ???? ?????? ??? ?? ???? ??????. 

    scikit-learn estimator? ???? ??? ??? ?? estimator? cuML?? ???? ?? GPU ???? (cuML) ?? ????? ????, ??? ?? ???? CPU ?? (scikit-learn) ?? ????? ?????. 

    ???? estimator? ??, ??? ??? ??? ?? ?? ???? ?? ???? ???? GPU ??? ?? ?????. ???? ?? ??? ?? ???? ??? ?? CPU?? ??? ????? ???? ?? ??? ???? ??? ??? ???? CPU? ?????.

    cuML? ??? ??, ????? CPU? scikit-learn ??? GPU? cuML ??? ???? ???? ??? ?? ?? ?? ??? ???? ???.

    ?? 1. NVIDIA cuML? ?? ?? ???? scikit-learn ??????? ????? ?????

    cuml.accel? ?? cuML? ???????? ???? ???? scikit-learn? ??? ?? ??? ???? Python ???? ?? ??????? ???? ?????. ?? ???? ????? ?????? CPU ?? ??????? ???? ?????.

    ?? ????? ?? ?? ??? cuML? NVIDIA GPU? ??? ???? ???? ?? scikit-learn? ?? ???? ??? ??? ????. 

    cuML? ????? ??? ???? ?? ?? ?? ?? ?? ??? ????, ??? ?? ?? ??? ??? ?? GPU ???? ????, ?? ??? ???? ??? ????? ????? ???????. ?? ????? ?? ?? ?? ?? ??? ??? ?? ?? ????? ??? ????? ??? ??? ??? ??? ?????. 

    ?? ?? ?????? ??? GPU ??? ??? ??? ? ????. cuml.accel ??? ???? CUDA unified memory? ?????. CUDA unified memory? ???? ??? ???? GPU ???? ?? ??? ? ???, ??? ?? ? ??? ?? ??? ??????? ???? ?????. ?? ML ??? ??? ? ?? ?? ??? ??? GPU ???? ??? ???? ??? ?????.

    cuML? ???? scikit-learn ?? ????? ??

    Google Colab?? scikit-learn? ?? ?? ?? ?? ??? ?? ??? ??? NVIDIA cuML? ?? ???? ????. 

    Jupyter ???? ?? ????, ?? import ??? ?? ?? ??? ?????. 

    %load_ext cuml.accel
    import sklearn

    ??? ?? ? ???? ??? cuML? ???? ??? RAPIDS Installation Guide? ?????. ?? ?? scikit-learn ????? ??????? python ?? ???? ?? ?? Python ????? ?????:

    python -m cuml.accel unchanged_script.py

    ??? 50? ?? ??? 100?? ??? ?? ?????? ?? ???? ??? ????? ??? scikit-learn ?????????.

    %load_ext cuml.accel
      
    from sklearn.datasets import make_classification
    from sklearn.model_selection import train_test_split
    from sklearn.ensemble import RandomForestClassifier
      
    X, y = make_classification(n_samples=500000, n_features=100, random_state=0)
    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)
      
    rf = RandomForestClassifier(n_estimators=100, random_state=0, n_jobs=-1)
      
    rf.fit(X_train, y_train)

    ??? ?? ??? GPU?? ?????, ?? ??? ??? ????? ?? ? ??? ??? ???? ?? ??? ??? ?????. ?? ?? ??? ?? ??? DEBUG? ?????:

    %load_ext cuml.accel
      
    from cuml.common import logger;
    logger.set_level(logger.level_enum.debug)
      
    from sklearn.datasets import make_classification

    ???? ?? ??? ? ??? ???? ?????? ???? ???? ?????. ?? ???? fit ??? GPU?? ?????: 

    cuML: Installed accelerator for sklearn.
    cuML: Installed accelerator for umap.
    cuML: Installed accelerator for hdbscan.
    cuML: Successfully initialized accelerator.
    cuML: Performing fit in GPU.

    ????

    ?? ? ??? ?? ???? ?????? Intel Xeon Platinum 8480CL CPU? H100 80GB GPU? scikit-learn ???? ?? ??? ??????. ? ??, ?? ????? ?? ???? ????? ?? ??? 25??? ???? CPU?? ? ? ??? ??? GPU?? ? ?? ??? ? ?????. 

    ??? ? ?? ?? ????? ?? ? ?? ?? ???? ??? ????? ? ? ?????? ?? ?????. ??? ??? GPU? CPU?? ? ?? ??? ?? ??? ? ??? ?? ? ????. ? ??? ??? ?? ??? ??? Zero Code Change Benchmarks? ?????.

    ?? 2. GPU?? cuML ? scikit-learn? CPU?? scikit-learn? ?? ML ???? ?? ?? ?? ??

    GPU ???? ?? ?? ??? ?? ??? ??? ????:

    • ????? ?? ???? ???? GPU ???? ?? ?? ?? ?? ????. ?? ???? ?? ????? ??? ?? ? ???? ?? ????? ???? ? ????.?
    • ?? ?? ???? GPU ?? ???? ?????. ?? ??? ??? ? ?? ??? ??? ???? ? ? ?? ??? ??????.

    cuML ????

    NVIDIA cuML? ?? ???? ?? ?? ?? ??? ???? NVIDIA GPU?? scikit-learn, UMAP ? HDBSCAN ??????? ????? ??? ??? ?????. ?? cuML? ??? ?? NVIDIA GPU? CUDA ????? ??? ??? ????, ?? ???? ?? ??? ?? CPU?? scikit-learn?? ???? ??? ? ????. ??? scikit-learn?? 50?, UMAP?? 60?, HDBSCAN?? 250? ? ?? ?? ??? ??????.

    ? ??? ?? ? ??? ??? NVIDIA cuML? ?????. ? ??? ?? ? ?? ??? Google Colab notebook? ?????. ?? ?? ?? ??? ?? ?? ??? cuML? Google Colab? ?? ???? ????.

    ?? ??? ?????? ???? ???????? ??? ???? ?????. Slack ?? #RAPIDS-GoAi?? ???? ???? ??? ???.

    ?? ??? ? ?? ?? ?? ??? DLI Learning Path for Data Science? ?????.

    ?? ???

    Discuss (0)
    0

    Tags

    人人超碰97caoporen国产