Add a mention to the replit-code model in the readme. (#1121)

This commit is contained in:
Laurent Mazare
2023-10-18 11:27:23 +01:00
committed by GitHub
parent 767a6578f1
commit 63c204c79e
3 changed files with 24 additions and 27 deletions

View File

@ -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
```

View File

@ -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.