mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 02:38:10 +00:00
Add a mention to the replit-code model in the readme. (#1121)
This commit is contained in:
@ -67,6 +67,7 @@ We also provide a some command line based examples using state of the art models
|
||||
- [Mistral7b-v0.1](./candle-examples/examples/mistral/): a 7b general LLM with
|
||||
performance larger than all publicly available 13b models as of 2023-09-28.
|
||||
- [StarCoder](./candle-examples/examples/bigcode/): LLM specialized to code generation.
|
||||
- [Replit-code-v1.5](./candle-examples/examples/replit-code/): a 3.3b LLM specialized for code completion.
|
||||
- [Quantized LLaMA](./candle-examples/examples/quantized/): quantized version of
|
||||
the LLaMA model using the same quantization techniques as
|
||||
[llama.cpp](https://github.com/ggerganov/llama.cpp).
|
||||
@ -155,6 +156,7 @@ If you have an addition to this list, please submit a pull request.
|
||||
- Phi v1.5.
|
||||
- Mistral 7b v0.1.
|
||||
- StableLM-3B-4E1T.
|
||||
- Replit-code-v1.5-3B.
|
||||
- T5.
|
||||
- Bert.
|
||||
- Whisper (multi-lingual support).
|
||||
|
@ -9,37 +9,32 @@ in `bfloat16` (so the GPU version will only work on recent nvidia cards).
|
||||
```bash
|
||||
cargo run --example replit-code --release -- --prompt 'def fibonacci(n): '
|
||||
```
|
||||
This produces the following output which actually doesn't generate the fibonacci
|
||||
series properly.
|
||||
This produces the following output.
|
||||
|
||||
```
|
||||
def fibonacci(n): # write Fibonacci series up to n
|
||||
"""Print a Fibonacci series up to n."""
|
||||
|
||||
assert type(n) == int, "n must be an integer"
|
||||
|
||||
if (type(fib_list)==None or len==0 ):
|
||||
fib_list = [1]
|
||||
|
||||
for i in range((len-2)): # start at 2nd element of list and go until end.
|
||||
n += 1
|
||||
|
||||
print("Fibonacci number",n,"is:",i)
|
||||
|
||||
def main():
|
||||
"""Call the functions."""
|
||||
|
||||
userInput=input('Enter a positive integer: ')
|
||||
|
||||
fibonacci(userInput)
|
||||
a, b = 0, 1
|
||||
while a < n:
|
||||
print(a, end=' ')
|
||||
a, b = b, a+b
|
||||
print()
|
||||
|
||||
|
||||
def fibonacci_loop(n): # write Fibonacci series up to n
|
||||
"""Print a Fibonacci series up to n."""
|
||||
result = []
|
||||
a, b = 0, 1
|
||||
while a < n:
|
||||
result.append(a)
|
||||
a, b = b, a+b
|
||||
return result
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__': # only run if this file is called directly.
|
||||
print("This program prints out Fibonacci numbers.")
|
||||
main()
|
||||
def fibonacci_generator(n): # write Fibonacci series up to n
|
||||
"""Print a Fibonacci series up to n."""
|
||||
a, b = 0, 1
|
||||
while a < n:
|
||||
yield a
|
||||
a, b = b, a+b
|
||||
```
|
||||
|
@ -155,7 +155,7 @@ struct Args {
|
||||
tokenizer: Option<String>,
|
||||
|
||||
/// Penalty to be applied for repeating tokens, 1. means no penalty.
|
||||
#[arg(long, default_value_t = 1.1)]
|
||||
#[arg(long, default_value_t = 1.)]
|
||||
repeat_penalty: f32,
|
||||
|
||||
/// The context size to consider for the repeat penalty.
|
||||
|
Reference in New Issue
Block a user