Skip to content

Commit

Permalink
Change logger init location for pyo3
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler committed Apr 29, 2024
1 parent 4505a5e commit 49cd334
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ To start an X-LoRA server with the exactly as presented in [the paper](https://a
To start an LoRA server with adapters from the X-LoRA paper (you should modify the ordering file to use only one adapter, as the adapter static scalings are all 1 and so the signal will become distorted):

```bash
./mistralrs_server --port 1234 lora-gguf -o orderings/xlora-paper-ordering.json -m TheBloke/zephyr-7B-beta-GGUF -f zephyr-7b-beta.Q8_0.gguf -x lamm-mit/x-lora
./mistralrs_server --port 1234 lora-gguf -o orderings/xlora-paper-ordering.json -m TheBloke/zephyr-7B-beta-GGUF -f zephyr-7b-beta.Q8_0.gguf -a lamm-mit/x-lora
```

Normally with a LoRA model you would use a custom ordering file. However, for this example we use the ordering from the X-LoRA paper because we are using the adapters from the X-LoRA paper.
Expand Down
10 changes: 5 additions & 5 deletions mistralrs-pyo3/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ impl Runner {
max_seqs
};

let filter = EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy();
tracing_subscriber::fmt().with_env_filter(filter).init();

let loader: Box<dyn Loader> = match which {
Which::Plain {
model_id,
Expand Down Expand Up @@ -797,6 +792,11 @@ impl ChatCompletionRequest {

#[pymodule]
fn mistralrs(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
let filter = EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy();
tracing_subscriber::fmt().with_env_filter(filter).init();

m.add_class::<Runner>()?;
m.add_class::<Which>()?;
m.add_class::<ChatCompletionRequest>()?;
Expand Down

0 comments on commit 49cd334

Please sign in to comment.