How to pass the api token using transformers candle (rust)?
Hello,I am trying to test the sample app for candle’s llama, but getting into issue downloading the model files due to the token id not being passed in the config.Using python transformers, you pass the api token like this:pipeline = transformers.pipeline(token=access_token,…)How do you do similar thing for transformers-candle (using rust)?thanks
2024-04-29T21:11:13Z
After dabbling a bit, I found the solution:let access_token = "your_api_key_value";
    let api_builder = ApiBuilder::new();
    let api_builder_token =  api_builder.with_token(Some(String::from(access_token)));
    let api = api_builder_token.build()?;
    let api_repo = api.repo(Repo::with_revision(model_id, RepoType::Model, revision));

    let tokenizer_filename = api_repo.get("tokenizer.json")?;
    let config_filename = api_repo.get("config.json")?;
    ....