LLamaSharp icon indicating copy to clipboard operation
LLamaSharp copied to clipboard

LLAMA 3

Open tiger2014 opened this issue 1 year ago • 10 comments

Hi Team,

LLAMA 3 can be used in this frame?

Thanks

tiger2014 avatar Apr 20 '24 02:04 tiger2014

it does function right now, but in my experience rather poorly, likely due to the weird prompt formatting that llama 3 has.

KirillianAmu avatar Apr 20 '24 14:04 KirillianAmu

If llama3 is being overly verbose, add "<|eot_id|>" to the AntiPrompts. I've had good results with it so far and it seems to have more personality than Mistral Instruct v0.2.

adammikulis avatar Apr 23 '24 00:04 adammikulis

If llama3 is being overly verbose, add "<|eot_id|>" to the AntiPrompts. I've had good results with it so far and it seems to have more personality than Mistral Instruct v0.2.

I added <|eot_id|>, but it seems to have no effect

imxcstar avatar Apr 24 '24 10:04 imxcstar

I'm not sure if our antiprompt detection will properly handle special tokens like that. I know there's special case handling for EOS in some places. That could be a good improvement to the antiprompt processing for someone to make.

martindevans avatar Apr 24 '24 13:04 martindevans

Hi, #708 has added an example of LLaMA3 chat session. I'll appreciate it if you would like to try it and report problem to us if any. To run it, please pull the latest code of master branch and run the example project. :)

SanftMonster avatar Apr 29 '24 02:04 SanftMonster

Will PR #6920 from llama.cpp resolve this issue?

adammikulis avatar Apr 29 '24 17:04 adammikulis

@adammikulis I'll update the native library binaries following https://github.com/ggerganov/llama.cpp/pull/6920. Besides you could also try the current master branch, which has already provided an example of LLaMA3.

SanftMonster avatar Apr 30 '24 09:04 SanftMonster

I think x == EOS should be replaced everywhere with a llama_token_is_eog(x) that should be true for all end-of-something tokens. Antiprompt for <|eot_id|> won't help cause special tokens are not rendered.

https://github.com/ggerganov/llama.cpp/pull/6745#issuecomment-2069181015

dlyz avatar Apr 30 '24 13:04 dlyz

I think x == EOS should be replaced everywhere with a llama_token_is_eog(x) that should be true for all end-of-something tokens. Antiprompt for <|eot_id|> won't help cause special tokens are not rendered.

That's right, we'll add such things soon. For now you could use "�" as anti-prompt as a temporary resolution.

SanftMonster avatar Apr 30 '24 16:04 SanftMonster

I think x == EOS should be replaced everywhere with a llama_token_is_eog(x)

This has actually been done in PR #712 (along with updating the binaries).

martindevans avatar Apr 30 '24 17:04 martindevans

llama3 has been supported for a while, so I'll close this issue now.

martindevans avatar Jun 26 '24 00:06 martindevans