Phi-2: Self-Extend Boosts Performance, Extends Context to 8k Without Training
old.reddit.com
old.reddit.com
It makes sense intuitively that the exact position of tokens really only matters for adjacent or near adjacent tokens. For far away tokens a rough position is fine.
Does anybody know what the difference is between the approach in OP vs other RoPE scaling approaches?
For a model trained with a ctx size of 2, that looks like: `[0, 1, *incoherence starts* 2, 3]`
Existing RoPE scaling methods try to stay in-distribution by assigning positions between the known in-distribution ones: `[0, 0.5, 1, 1.5]`. This is still ~kinda OOD, but works w/ some fine tuning.
The method in OP breaks the core premise that we need unique positions at all, and just gives multiple tokens the same position: `[0, 0, 1, 1]`.
As I understand it the positional encodings are calculated relative to the token in question. It’s not like 3 and 14 are unordered tokens from their own perspective.
Benchmarks: https://github.com/ggerganov/llama.cpp/discussions/4508
I don't see them taking over general purpose chat/query use cases, but fined tuned to a specific use case and embedded into mobile apps, might be how we see LLMs jump from cool tech demos to something that's present in most products.
brew install ollama
brew services start ollama
curl http://localhost:11434/api/generate -d '{
"model": "phi:2.7b-chat-v2-q5_K_M",
"prompt": "Generate a JSON object that models a list of products",
"raw": true, "format": "json",
"stream": false
}' | jq
If you want to keep in touch / share intel: linkedin.com /in/ aluxian or `me` at my username dot com> Models with around 125M parameters such as GPT-Neo (small) or GPT-2 (small) can rarely generate coherent and consistent English text beyond a few words even after extensive training.
I have had a similar bad experience with it trying to prompt it