728x90
git clone https://github.com/huggingface/candle.git
Candle ์ด๋?
Candle์ ์ฑ๋ฅ(GPU ์ง์)๊ณผ ์ฌ์ฉ ํธ์์ฑ์ ์ค์ ์ ๋ rust ์ฉ Minimalist ML ํ๋ ์์ํฌ์ ๋๋ค. whisper, LLaMA2, T5, yolo, Segment Anything์ ํ๋ฒ์ ๋ถ๋ฌ์ ์ฌ์ฉํ ์ ์๊ณ huggingface์ ๋ค์ํ ๋ชจ๋ธ์ ์ง์ํฉ๋๋ค.
Kakaobot์ ์ฌ์ฉํ Stable Diffusion ์ฌ์ฉ ์์
์ค์น ๋ฐฉ๋ฒ
1) Candle์ Rust๋ฅผ ์ฌ์ฉํ๋ฏ๋ก rust package ๊ด๋ฆฌ์์ธ Cargo๋ฅผ ์ค์นํด์ค๋ค.
curl https://sh.rustup.rs -sSf | sh
# env enroll
source "$HOME/.cargo/env"
rustc --version # rustc 1.75.0 (82e1608df 2023-12-21)
# make๋ ์ฌ์ฉ
make --version
# GNU Make 4.2.1
# Built for x86_64-pc-linux-gnu
https://doc.rust-lang.org/cargo/getting-started/installation.html
2-1) git clone
git clone https://github.com/huggingface/candle.git
cd candle
2-2) candle install
# cargo env set
cargo new myapp
cd myapp
# cuda version candle-core ์ค์น [CUDA ๋ฒ์ ]
cargo add --git https://github.com/huggingface/candle.git candle-core --features "cuda"
error: unrecognized feature for crate candle-core: cuda ์๋ฌ์
cargo add --features candle-core/cuda --git https://github.com/huggingface/candle.git candle-core
# https://github.com/huggingface/candle/issues/1497
makefile ๋ณต์ฌ
https://huggingface.github.io/candle/guide/installation.html
2-3) Package install
cargo run --example whisper --release
https://github.com/huggingface/candle/tree/main/candle-examples/examples/whisper
Whisper, vit, t5 ๋ฑ ๋ฑ ์ ๋ช ํ model์ candleํ๋๋ก ๋ค ์์ฝ๊ฒ ์ค์น๊ฐ ๊ฐ๋ฅํ๋ค. ๋ํ quantized ๋ชจ๋ธ๋ ์ง์
๋ฐ์ํ
'๐ ๏ธ Tools' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[NotesOllama] Mac Default Memo Application + OpenLLM(Custom) (0) | 2024.02.25 |
---|---|
[Gemini-pro] ๊ตฌ๊ธ ์ผ๋ฏธ๋ Pro, beta ๋ฌด๋ฃ (0) | 2024.02.09 |
[Github Copilot] Prompt crafting (0) | 2023.12.02 |
[Ubuntu] Vim plugin ์ค์น(๋ค์ฌ์ฐ๊ธฐ, ์๋๊ดํธ) (0) | 2020.05.31 |
[Ubuntu] ์ฐ๋ถํฌ ์๋ฒ์ ์๋ฐ ์ค์น (0) | 2020.04.05 |