Skip to content

Commit

Permalink
update block to be text
Browse files Browse the repository at this point in the history
  • Loading branch information
zachcp committed Nov 17, 2024
1 parent 8a34fff commit 9ddb2b0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions candle-transformers/src/models/bert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
//! - Upstream [Github repo](https://github.com/google-research/bert).
//! - See bert in [candle-examples](https://github.com/huggingface/candle/tree/main/candle-examples/) for runnable code
//!
//! ```ignore
//! // for sentence embeddings
//! ```rust,text
//! // Different models can be loaded using the model ID
//! # use candle_core::Tensor;
//! # use candle_nn::{VarBuilder, Module};
//! # fn main() -> candle_core::Result<()> {
//! # let model = todo!();
//! # let prompt = "Here is a test sentence";
//! let embeddings = model.forward(prompt)?;
//! // Returns tensor of shape [1, 7, 384]
//! println!("{embeddings}");
//! # let vb = todo!();
//! # let config = todo!();
//! let model = BertModel::load(vb, &config )?;
//! # Ok(())
//! # }
//!
//! // Different models can be loaded using the model ID
//! // for sentence embeddings
//! # use candle_core::Tensor;
//! # use candle_nn::{VarBuilder, Module};

Check failure on line 23 in candle-transformers/src/models/bert.rs

View workflow job for this annotation

GitHub Actions / Test Suite (macOS-latest, stable)

the name `VarBuilder` is defined multiple times

Check failure on line 23 in candle-transformers/src/models/bert.rs

View workflow job for this annotation

GitHub Actions / Test Suite (macOS-latest, stable)

the name `Module` is defined multiple times
//! # fn main() -> candle_core::Result<()> {

Check failure on line 24 in candle-transformers/src/models/bert.rs

View workflow job for this annotation

GitHub Actions / Test Suite (macOS-latest, stable)

the name `main` is defined multiple times
//! # let vb = todo!();
//! # let config = todo!();
//! let model = BertModel::load(vb, &config )?;
//! # let model = todo!();
//! let prompt = "Here is a test sentence";
//! let embeddings = model.forward(prompt)?;
//! // Returns tensor of shape [1, 7, 384]
//! println!("{embeddings}");
//! # Ok(())
//! # }
//!
Expand Down
2 changes: 1 addition & 1 deletion candle-transformers/src/models/dinov2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//!
//! # Example usage
//!
//! ```ignore
//! ```rust,text
//! # use candle::Result;
//! # fn main() -> Result<()> {
//! use candle_transformers::dinov2::vit_small;
Expand Down

0 comments on commit 9ddb2b0

Please sign in to comment.