Skip to content

πŸ“ Proposal: Add CAJAL as Native Research/Documentation ModelΒ #411

@Agnuxo1

Description

@Agnuxo1

πŸ“ Proposal: Add CAJAL as Native Research/Documentation Model for Trae Agent

Summary

CAJAL is an open-source scientific paper generation model (4B–9B parameters) that runs entirely locally via Ollama. It ranks #3 globally on scientific writing benchmarks, beating GPT-4 and Gemini.

Why Trae Agent + CAJAL?

Trae Agent already supports Ollama (great!). But CAJAL brings a new use case: instead of just coding, Trae Agent could generate:

  • Research documentation from code
  • README academic papers
  • Methodology sections for ML repos
  • Grant proposals and tech reports

Proposal

Add CAJAL as a preset model option alongside existing Ollama models:

# .trae-agent-config.yaml
provider: ollama
model: cajal-9b-v2   # Auto-downloads from Ollama library
mode: research       # New mode: code β†’ documentation

Research Mode Workflow:

  1. Agent reads codebase structure and docstrings
  2. Feeds context to CAJAL via Ollama API
  3. Generates: Abstract, Methodology, Results, Discussion
  4. Outputs LaTeX/Markdown directly to docs/ folder

Model Availability

Model Ollama Pull Command Size VRAM
CAJAL-9B-v2-Q4_K_M ollama pull cajal-9b-v2-q4 4.7 GB 6 GB
CAJAL-9B-v2-Q6_K ollama pull cajal-9b-v2-q6 6.8 GB 8 GB
CAJAL-9B-v2-Q8_0 ollama pull cajal-9b-v2-q8 8.9 GB 10 GB

Note: We can provide official Ollama model manifests if needed.

Benchmark Results πŸ†

CAJAL-9B v2 ranks #3 on P2PCLAW Scientific Writing Benchmark:

Rank Model Score
1 Claude Sonnet 4.6 8.9
2 [Undisclosed] 8.7
3 CAJAL-9B v2 8.4
4 GPT-4 Turbo 8.1
5 Gemini 1.5 Pro 7.9

A 9B local model beating 70B+ cloud models on scientific writing.

Links

Team

  • Francisco Angulo de Lafuente (Lead, Spain)
  • Vladimir Veselov (MIET Moscow)
  • Seid Mehammed Abdu (Woldia University)
  • Nirmal Tej Kumar (UT Dallas)

Next Steps

We're ready to:

  1. Provide official Ollama manifests for all CAJAL variants
  2. Submit a PR adding CAJAL preset to Trae Agent
  3. Create a demo video showing Trae Agent + CAJAL generating a paper from a codebase

Would love to hear your thoughts!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions