diff --git a/README.md b/README.md index c3e35d33..533e7492 100644 --- a/README.md +++ b/README.md @@ -45,40 +45,48 @@ For more advanced examples, please have a look at the following section. ## Check out our examples -Check out our [examples](./candle-examples/examples/): +These online demos run entirely in your browser: +- [yolo](https://huggingface.co/spaces/lmz/candle-yolo): pose estimation and + object recognition. +- [whisper](https://huggingface.co/spaces/lmz/candle-whisper): text to speech. +- [LLaMA2](https://huggingface.co/spaces/lmz/candle-llama2): text generation. + +We also provide a some command line based examples using state of the art models: -- [Whisper](./candle-examples/examples/whisper/): speech recognition model. - [LLaMA and LLaMA-v2](./candle-examples/examples/llama/): general LLM. - [Falcon](./candle-examples/examples/falcon/): general LLM. -- [Bert](./candle-examples/examples/bert/): useful for sentence embeddings. - [StarCoder](./candle-examples/examples/bigcode/): LLM specialized to code generation. -- [Stable Diffusion](./candle-examples/examples/stable-diffusion/): text to - image generative model, support for the 1.5, 2.1, and SDXL 1.0 versions. -- [DINOv2](./candle-examples/examples/dinov2/): computer vision model trained - using self-supervision (can be used for imagenet classification, depth - evaluation, segmentation). - [Quantized LLaMA](./candle-examples/examples/quantized/): quantized version of the LLaMA model using the same quantization techniques as [llama.cpp](https://github.com/ggerganov/llama.cpp). + + + +- [Stable Diffusion](./candle-examples/examples/stable-diffusion/): text to + image generative model, support for the 1.5, 2.1, and SDXL 1.0 versions. + + + - [yolo-v3](./candle-examples/examples/yolo-v3/) and [yolo-v8](./candle-examples/examples/yolo-v8/): object detection and pose estimation models. + + - [segment-anything](./candle-examples/examples/segment-anything/): image segmentation model with prompt. -Run them using the following commands: + + + +- [Whisper](./candle-examples/examples/whisper/): speech recognition model. +- [Bert](./candle-examples/examples/bert/): useful for sentence embeddings. +- [DINOv2](./candle-examples/examples/dinov2/): computer vision model trained + using self-supervision (can be used for imagenet classification, depth + evaluation, segmentation). + +Run them using commands like: ``` -cargo run --example whisper --release -cargo run --example llama --release -cargo run --example falcon --release -cargo run --example bert --release -cargo run --example bigcode --release -cargo run --example stable-diffusion --release -- --prompt "a rusty robot holding a fire torch" -cargo run --example dinov2 --release -- --image path/to/myinput.jpg cargo run --example quantized --release -cargo run --example yolo-v3 --release -- myimage.jpg -cargo run --example yolo-v8 --release -- myimage.jpg # for pose estimation, add --task pose -cargo run --example segment-anything --release -- --image myimage.jpg ``` In order to use **CUDA** add `--features cuda` to the example command line. If diff --git a/candle-examples/examples/bigcode/README.md b/candle-examples/examples/bigcode/README.md index 0b593674..cb4e79b1 100644 --- a/candle-examples/examples/bigcode/README.md +++ b/candle-examples/examples/bigcode/README.md @@ -1,7 +1,19 @@ # candle-starcoder: code generation model -StarCoder/BigCode is a LLM model specialized to code generation. +[StarCoder/BigCode](https://huggingface.co/bigcode/starcoderbase-1b) is a LLM +model specialized to code generation. The initial model was trained on 80 +programming languages. + +## Running some example ```bash cargo run --example bigcode --release -- --prompt "fn fact(n: u64) -> u64 " + +> fn fact(n: u64) -> u64 { +> if n == 0 { +> 1 +> } else { +> n * fact(n - 1) +> } +> } ``` diff --git a/candle-examples/examples/yolo-v8/README.md b/candle-examples/examples/yolo-v8/README.md index 8590a8a9..938dea13 100644 --- a/candle-examples/examples/yolo-v8/README.md +++ b/candle-examples/examples/yolo-v8/README.md @@ -13,7 +13,7 @@ Space](https://huggingface.co/spaces/lmz/candle-yolo). The model then fully runs in your browser using WebAssembly - if you use a custom image it will never leave your phone/computer! -## Running some example. +## Running some example ### Object Detection ```bash