reka-flash-3 / README.md
chezhengreka's picture
readme
9168f15
|
raw
history blame
3.66 kB
metadata
license: apache-2.0

Reka Flash 3

Reka Flash 3 is Reka latest general-purpose reasoning model that excels in general chat, coding, instruction following, and function calling. At a size of 21B parameters, it performs competitively with proprietary models such as OpenAI o1-mini, making it a good foundation to build many applications that require low latency or on-device deployments. It is currently the best model in its size category.

Performance

Try it out at Reka Space.

Quickstart

For easiet consumption, the model is released in a Llama-compatible format. Feel free to use any library compatible with Llama to run the model.

Via Hugging Face

import transformers

tokenizer = transformers.AutoTokenizer.from_pretrained("reka/reka-flash-3")
model = transformers.AutoModelForCausalLM.from_pretrained("reka/reka-flash-3", torch_dtype='auto', device_map='auto')

prompt = {"role": "user", "content": "Write a poem about large language model."}
text = tokenizer.apply_chat_template([prompt], tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(**model_inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Via vLLM

docker run --rm -it --network=host --gpus '"device=0"' -v  --shm-size=10.24gb vllm/vllm-openai:latest serve RekaAI/reka-flash-3 --dtype auto -tp 1

Model Details

Prompt Format

Reka Flash 3 uses cl100k_base tokenizer and adds no additional special tokens. The general prompt format is as follows:

human: this is round 1 prompt <sep> assistant: this is round 1 response <sep> ...

System prompt can be added by prepending to the first user round.

human: You are a friendly assistant blah ... this is round 1 user prompt <sep> assistant: this is round 1 response <sep> ...

And for multi-round conversations, it is recommended to drop the Chain-Of-Thought reasoning traces in the previous assistant round to save tokens for the model to think.

Budget Forcing

Reka Flash thinks before it produces an output. We use tags to indicate the beginning and the end of its thinking process. For some problems, the model might think for a long time. You can make the model to stop its thinking process by forcing it to output after a certain number of steps. We observe such a budget forcing mechanism will still produce a reasonable output. We show performance on AIME-2024 (cons@16) for various budgets below.

Budget Score
4k 40
8k 46
12k 50
16k 56
24k 60
32k 60
48k 63.3

Language Support

This model is primarily built for the English language, and you should consider this an English only model. However, the model is able to converse and understand other languages to some degree, as can be seen by its performance on WMT23 and BeleBele below.

Known Limitations

  • It is not the best model for knowledge-intensive tasks. We recommend coupling Reka Flash-2.5 with web search for knowledge-related tasks.
  • The model often thinks in English when prompted questions in non-English languages. We observe that this sometimes affects the output quality in non-English languages.
  • The model has not undergone extensive persona training so in rare circumstances it might become confused about its identity due to AI-generated text that is polluting the internet.