Views
No views yet
| Benchmark | Reka Edge | Cosmos-Reason2 8B | Qwen 3.5 9B | Gemini 3 Pro |
|---|---|---|---|---|
| VQA-V2 Visual Question Answering | 88.40 | 79.82 | 83.22 | 89.78 |
| MLVU Video Understanding | 74.30 | 37.85 | 52.39 | 80.68 |
| MMVU Multimodal Video Understanding | 71.68 | 51.52 | 68.64 | 78.88 |
| RefCOCO-A Object Detection | 93.13 | 90.98 | 93.62 | 81.46 |
| RefCOCO-B Object Detection | 86.70 | 85.74 | 88.83 | 82.85 |
| VideoHallucer Hallucination | 59.57 | 51.65 | 56.00 | 66.78 |
| Mobile Actions Tool Use | 88.40 | 77.94 | 91.78 | 89.39 |
| Metric | Reka Edge | Cosmos-Reason2 8B | Qwen 3.5 9B | Gemini 3 Pro* |
|---|---|---|---|---|
| Input tokens For a 1024 x 1024 image | 331 | 1063 | 1041 | 1094 |
| End-to-end latency (in seconds) | 4.69 ± 2.48 | 10.56 ± 3.47 | 10.31 ± 1.81 | 16.67 ± 4.47 |
| TTFT (s) Time to first token | 0.522 ± 0.452 | 0.844 ± 0.923 | 0.60 ± 0.65 | 13.929 ± 3.872 |
example.py script. It uses PEP 723 inline metadata so uv resolves dependencies automatically — no manual install step:uv run example.py --image media/hamburger.jpg --prompt "What is in this image?"uv pip install "transformers==4.57.3" torch torchvision pillow tiktoken imageio einops av1import torch
2from PIL import Image
3from transformers import AutoModelForImageTextToText, AutoProcessor
4
5model_id = "RekaAI/reka-edge-2603"
6
7# Load processor and model
8processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
9model = AutoModelForImageTextToText.from_pretrained(
10 model_id,
11 trust_remote_code=True,
12 torch_dtype=torch.float16,
13).eval()
14
15# Move to MPS (Apple Silicon GPU)
16device = torch.device("mps")
17model = model.to(device)
18
19# Prepare an image + text query
20image_path = "media/hamburger.jpg" # included in the model repo
21messages = [
22 {
23 "role": "user",
24 "content": [
25 {"type": "image", "image": image_path},
26 {"type": "text", "text": "What is in this image?"},
27 ],
28 }
29]
30
31# Tokenize using the chat template
32inputs = processor.apply_chat_template(
33 messages,
34 tokenize=True,
35 add_generation_prompt=True,
36 return_tensors="pt",
37 return_dict=True,
38)
39
40# Move tensors to device
41for key, val in inputs.items():
42 if isinstance(val, torch.Tensor):
43 if val.is_floating_point():
44 inputs[key] = val.to(device=device, dtype=torch.float16)
45 else:
46 inputs[key] = val.to(device=device)
47
48# Generate
49with torch.inference_mode():
50 # Stop on <sep> token (end-of-turn) in addition to default EOS
51 sep_token_id = processor.tokenizer.convert_tokens_to_ids("<sep>")
52 output_ids = model.generate(
53 **inputs,
54 max_new_tokens=256,
55 do_sample=False,
56 eos_token_id=[processor.tokenizer.eos_token_id, sep_token_id],
57 )
58
59# Decode only the generated tokens
60input_len = inputs["input_ids"].shape[1]
61new_tokens = output_ids[0, input_len:]
62output_text = processor.tokenizer.decode(new_tokens, skip_special_tokens=True)
63
64# Strip any trailing <sep> turn-boundary marker
65output_text = output_text.replace("<sep>", "").strip()
66print(output_text)--video instead of --image:uv run example.py --video media/dashcam.mp4 --prompt "Is this person falling asleep?"1messages = [
2 {
3 "role": "user",
4 "content": [
5 {"type": "video", "video": "media/dashcam.mp4"},
6 {"type": "text", "text": "Is this person falling asleep?"},
7 ],
8 }
9]Detect: {expression} to instruct the model to perform object detection, where {expression} can describe a single object or multiple objects.1messages = [
2 {
3 "role": "user",
4 "content": [
5 {"type": "image", "image": image_path},
6 {"type": "text", "text": "Detect: red car, man in the white"},
7 ],
8 }
9]1messages = [
2 {
3 "role": "user",
4 "content": [
5 {"type": "text", "text": "What is the capital of France?"},
6 ],
7 }
8]bfloat16. Always use torch.float16. Do not use device_map="auto" — it is not compatible with MPS. Load the model to CPU first, then call .to("mps").transformers==4.57.3. Using a different version may cause loading errors or incorrect behavior.vLLM.serve.sh in vllm-reka with $MODEL_PATH set to RekaAI/reka-edge-2603.bash serve.sh--quantization flag from server.sh.1import openai
2
3client = openai.OpenAI(
4 base_url="http://localhost:8000/v1",
5 api_key="EMPTY",
6 timeout=3600
7)
8
9# Video query
10response = client.chat.completions.create(
11 model="RekaAI/reka-edge-2603",
12 messages=[
13 {
14 "role": "user",
15 "content": [
16 {"type": "video_url", "video_url": {"url": "https://example.com/video.mp4"}},
17 {"type": "text", "text": "Describe the video"},
18 ],
19 }
20 ],
21 stop=["\n\n<sep>"],
22)
23print(response.choices[0].message.content)
24
25# Image query
26response = client.chat.completions.create(
27 model="RekaAI/reka-edge-2603",
28 messages=[
29 {
30 "role": "user",
31 "content": [
32 {"type": "image_url", "image_url": {"url": "https://example.com/image.png"}},
33 {"type": "text", "text": "What is in this image?"}
34 ]
35 }
36 ],
37 stop=["\n\n<sep>"],
38)
39print(response.choices[0].message.content)
40
41# Object detection query
42response = client.chat.completions.create(
43 model="RekaAI/reka-edge-2603",
44 messages=[
45 {
46 "role": "user",
47 "content": [
48 {"type": "image_url", "image_url": {"url": "https://example.com/image.png"}},
49 {"type": "text", "text": "Detect: green banana"}
50 ]
51 }
52 ],
53 stop=["\n\n<sep>"],
54)
55print(response.choices[0].message.content)
56
57# Text-only query
58response = client.chat.completions.create(
59 model="RekaAI/reka-edge-2603",
60 messages=[
61 {
62 "role": "user",
63 "content": "What is the capital of France?",
64 }
65 ],
66 stop=["\n\n<sep>"],
67)
68print(response.choices[0].message.content)**trust_remote_code=True** is required because the model uses custom architecture code (Yasa2ForConditionalGeneration) that is bundled in this repository and loaded via the auto_map config.