summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/rust-ci.yml4
-rw-r--r--candle-examples/examples/quantized/main.rs9
2 files changed, 6 insertions, 7 deletions
diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml
index b435bdfa..2ca53b23 100644
--- a/.github/workflows/rust-ci.yml
+++ b/.github/workflows/rust-ci.yml
@@ -16,7 +16,6 @@ jobs:
rust: [stable]
steps:
- uses: actions/checkout@v2
- - uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
@@ -36,7 +35,6 @@ jobs:
rust: [stable]
steps:
- uses: actions/checkout@v2
- - uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
@@ -52,7 +50,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
@@ -69,7 +66,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- - uses: arduino/setup-protoc@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
diff --git a/candle-examples/examples/quantized/main.rs b/candle-examples/examples/quantized/main.rs
index 2e9e7f07..15926e0a 100644
--- a/candle-examples/examples/quantized/main.rs
+++ b/candle-examples/examples/quantized/main.rs
@@ -24,7 +24,7 @@ enum Prompt {
One(String),
}
-#[derive(Clone, Debug, Copy, ValueEnum)]
+#[derive(Clone, Debug, Copy, PartialEq, Eq, ValueEnum)]
enum Which {
#[value(name = "7b")]
L7b,
@@ -64,7 +64,8 @@ impl Which {
| Self::L7bCode
| Self::L13bCode
| Self::L34bCode => false,
- Self::Mistral7b | Self::Mistral7bInstruct | Self::Zephyr7b => true,
+ // Zephyr is a fine tuned version of mistral and should be treated in the same way.
+ Self::Zephyr7b | Self::Mistral7b | Self::Mistral7bInstruct => true,
}
}
}
@@ -335,7 +336,9 @@ fn main() -> anyhow::Result<()> {
prompt.pop();
}
}
- if args.which.is_mistral() {
+ if args.which == Which::Zephyr7b {
+ format!("<|system|>\n</s>\n<|user|>\n{prompt}</s>\n<|assistant|>")
+ } else if args.which.is_mistral() {
format!("[INST] {prompt} [/INST]")
} else {
prompt