From the course: Rust LLMOps

Unlock this course with a free trial

Join today to access over 24,600 courses taught by industry experts.

Basic syntax and model loading in Rust-BERT

Basic syntax and model loading in Rust-BERT - Rust Tutorial

From the course: Rust LLMOps

Basic syntax and model loading in Rust-BERT

- [Instructor] All right, so I have rust-bert here, where I've already got it installed in a GitHub Codespace environment, and what do I want to do next? Well, I want to look at the different examples that can be executed just from a git pull. And this is one of the big advantages of the Rust ecosystem, is that once I do a git clone, as long as I have a proper installation with CUDA and I have an environment, let's say like in GitHub Codespaces, I can run each of these examples very, very easily, right? And let's go ahead and try it out. So first up, if I look at this repo and I do a git remote -v, right, we can see that I've got it cloned. And if I toggle this down and I go to examples, look at this. We have all these different, really cool examples to try out and it's trivial, right? So all I need to do is run an example, for example, cargo run --example, and then put the name of the Rust file. So if we look at sentiment_analysis here, let's actually dive into the specifics of…

Contents