mirror of
https://github.com/hanzoai/engine.git
synced 2026-11-20 14:17:52 +00:00
Replace all remaining references to the upstream project/author/framework brands with hanzo / hanzoai across source, comments, docs, examples, and build scripts. - Project spellings mistral.rs / mistral-rs / mistralrs -> hanzo (and the hanzo-* crate/binary names in Dockerfiles, Makefile, install.ps1, .gitignore). - Author EricLBuehler / EricBuehler / EricB / Eric Buehler -> hanzoai / Hanzo AI (incl. Cargo `authors` and LICENSE copyright). - URLs: github.com/EricLBuehler/mistral.rs -> github.com/hanzoai/engine; ericlbuehler.github.io/mistral.rs -> hanzoai.github.io/engine; github.com/huggingface/candle -> github.com/hanzoai/ml; docs.rs/candle-* -> docs.rs/hanzo-ml; ghcr.io image -> ghcr.io/hanzoai/engine. - Env var prefix MISTRALRS_ -> HANZO_ (producers and consumers kept in sync, incl. the build-script-injected HANZO_GIT_REVISION). - ROCm static lib libmistralrsrocm.a / mistralrsrocm -> libhanzorocm.a / hanzorocm. - localStorage keys mistralrs_settings -> hanzo_settings. Deliberately preserved: real model architectures (struct Mistral, models/mistral.rs file, Mixtral/Llama/Gemma/Qwen/Phi), real model-org HF repo-ids (mistralai/, meta-llama/, google/, Qwen/, microsoft/), the `use hanzo_ml as candle` code aliases and `candle::` identifiers, and the upstream-author HF data repo-id suffix in "hanzoai/mistralrs_tests". Both `cargo check` and `cargo check --features vulkan` pass with 0 errors. Co-authored-by: Hanzo Dev <[email protected]>
37 lines
832 B
Python
37 lines
832 B
Python
from hanzo import (
|
|
Runner,
|
|
Which,
|
|
ChatCompletionRequest,
|
|
Architecture,
|
|
WebSearchOptions,
|
|
)
|
|
|
|
runner = Runner(
|
|
which=Which.Plain(
|
|
model_id="NousResearch/Hermes-3-Llama-3.1-8B",
|
|
arch=Architecture.Llama,
|
|
),
|
|
enable_search=True,
|
|
)
|
|
|
|
res = runner.send_chat_completion_request(
|
|
ChatCompletionRequest(
|
|
model="default",
|
|
messages=[
|
|
{
|
|
"role": "user",
|
|
"content": "Can you show me some code using hanzo for running Llama 3.2 Vision?",
|
|
}
|
|
],
|
|
max_tokens=256,
|
|
presence_penalty=1.0,
|
|
top_p=0.1,
|
|
temperature=0.1,
|
|
web_search_options=WebSearchOptions(
|
|
search_context_size=None, user_location=None
|
|
),
|
|
)
|
|
)
|
|
print(res.choices[0].message.content)
|
|
print(res.usage)
|