candle::Tensor vs candle_core::Tensor #1773
-
What is the difference between
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
As I can see, they are the same. Line 84 in 4fd00b8 Also, I think For example, in candle/candle-examples/Cargo.toml Line 14 in 4fd00b8 Line 34 in 4fd00b8 So, when using candle published crates, you will have For example, to convert an example from Something like: (your project)
cargo add candle-core@0.4.0
cargo add candle-nn@0.4.0
cargo add candle-transformers@0.4.0
curl -kLo src/main.rs https://github.com/huggingface/candle/raw/6400e1b0a08d594e1448d522a41bddc98c584313/candle-examples/examples/phi/main.rs
sed -i '' 's/candle::/candle_core::/' src/main.rs I did this yesterday to test only the CPU and Metal devices. Full "decoupling" of the Phi example: |
Beta Was this translation helpful? Give feedback.
As I can see, they are the same.
candle/candle-core/src/lib.rs
Line 84 in 4fd00b8
Also, I think
candle::
instead ofcandle_core::
is just an artifact of how the workspace is configured.For example, in
candle-examples
:candle/candle-examples/Cargo.toml
Line 14 in 4fd00b8
candle/Cargo.toml
Line 34 in 4fd00b8
So, when using candle published crates, you will have
candle_core::
.For example, to convert an example from
candle-examples
to use the crates, you have to rewrite the "uses" of candle.So…