Complete the mixformer implementation. (#930)

* Complete the mixformers implementation.

* Tweak the attention.

* Add the phi-1.5 example.

* Improve the phi example.

* Bugfix.

* Get the phi example to work.
This commit is contained in:
Laurent Mazare
2023-09-22 20:03:16 +01:00
committed by GitHub
parent a46b1b4657
commit df6f5240ba
3 changed files with 321 additions and 31 deletions

View File

@ -0,0 +1,23 @@
# candle-starcoder: code generation model
[phi-1.5](https://huggingface.co/microsoft/phi-1_5).
## Running some example
```bash
$ cargo run --example phi --release -- --prompt "def print_prime(n): "
def print_prime(n):
print("Printing prime numbers")
for i in range(2, n+1):
if is_prime(i):
print(i)
def is_prime(n):
if n <= 1:
return False
for i in range(2, int(math.sqrt(n))+1):
if n % i == 0:
return False
return True
```