Cheon Cypher 0.8B v1

A Text2Cypher model with 0.8B parameters. It reads a property graph schema and a question, answers with one Cypher query that uses only the names in that schema, and loads with AutoModelForCausalLM.

Highlights

  • Ahead of GPT-5.5 and Opus 4.7 on CypherBench at 0.8B: 88.91 execution accuracy against their zero-shot 88.79 and 88.58, and above CYQUARK-4B (85.38), a 4B model trained for the task.
  • 73.25 on Mind the Query, above Llama-4-Maverick and Qwen2.5-72B zero-shot and a fine-tuned Llama-3.1-8B, with the highest Evaluation score in the table (93.35).
  • 64.03 on ZOGRASCOPE, above Qwen3.6-27B (47.26) and GPT-4o (30.29) zero-shot.
  • Small and local: 1.5 GB of float16 weights, on a single GPU or on CPU.

Benchmarks

Execution accuracy: a query is right when it returns the same result as the reference query.

Mind the Query

System Complex Agg. Complex Retr. Evaluation Simple Agg. Simple Retr. Total
DeepSeek-V3, zero-shot 49.93 69.04 89.02 79.97 92.76 76.75
DeepSeek-V3, few-shot 45.77 69.67 87.91 79.72 93.39 75.94
Llama-4-Maverick, few-shot 37.09 71.94 92.17 81.14 86.71 74.57
Cheon Cypher (0.8B) 45.21 47.33 93.35 78.57 93.24 73.25
Llama-4-Maverick, zero-shot 24.05 66.46 91.71 82.39 86.40 70.97
Llama-3.1-8B, fine-tuned 33.63 61.09 87.27 80.63 85.45 70.15
Llama-3.3-70B, few-shot 31.52 53.22 85.34 70.20 89.11 66.76
Qwen2.5-72B, zero-shot 27.22 55.99 85.81 71.20 86.84 66.32

Rows other than Cheon Cypher are from Tables 3 and 4 of the Mind the Query paper (EMNLP 2025 Industry).

CypherBench

System Execution accuracy (graph average)
Cheon Cypher (0.8B) 88.91
GPT-5.5, zero-shot 88.79
Opus 4.7, zero-shot 88.58
CYQUARK-4B 85.38
CYQUARK-0.8B 84.09

Question average: 87.95. Rows other than Cheon Cypher are from the CYQUARK paper (Table 3).

ZOGRASCOPE

System Execution accuracy (average of iid, compositional, length)
CYQUARK-4B 78.47
CYQUARK-0.8B 74.96
Opus 4.7, zero-shot 70.90
GPT-5.5, zero-shot 65.68
Cheon Cypher (0.8B) 64.03
Qwen3.6-27B, zero-shot 47.26
Qwen3.5-9B, zero-shot 30.68
GPT-4o, zero-shot 30.29
Qwen3.5-4B, zero-shot 27.73
Qwen3-4B, zero-shot 6.11
Mistral-7B, zero-shot 4.74
Llama-3.2-3B, zero-shot 1.70

Question average: 62.73. The GPT-4o, Qwen3-4B, Mistral-7B and Llama-3.2-3B rows are the zero-shot results of the ZOGRASCOPE paper (Findings of EMNLP 2025, Table 4), which gives the model the gold entities of each question and reports the three partitions; their average is taken here. The other rows are from the CYQUARK paper (Table 4), whose harness gives a higher score than this one to the same untrained model (Qwen3.5-4B: 27.73 there, 15.28 here).

Usage

The cheon-cypher package builds the prompt and reads the query out of the answer:

pip install git+https://github.com/cheon-ai-official/cheon-cypher
from cheon_cypher import CheonCypher

cypher = CheonCypher()  # cheonai/cheon-cypher-0.8b-v1 on CUDA or CPU

schema = """Node properties:
Match {date: DATE, id: STRING, stage: STRING}
Person {dob: DATE, id: STRING, name: STRING}
Squad {id: STRING}
Team {id: STRING, name: STRING}
Tournament {id: STRING, name: STRING, shortName: STRING, year: INTEGER}
Relationship properties:
PLAYED_IN {minuteOn: STRING, penaltyScore: INTEGER, score: INTEGER, type: STRING}
SCORED_GOAL {minute: STRING}
The relationships:
(:Person)-[:COACH_FOR]->(:Squad)
(:Squad)-[:FOR]->(:Tournament)
(:Person)-[:IN_SQUAD]->(:Squad)
(:Match)-[:IN_TOURNAMENT]->(:Tournament)
(:Team)-[:NAMED]->(:Squad)
(:Team)-[:PARTICIPATED_IN]->(:Tournament)
(:Person)-[:PLAYED_IN]->(:Match)
(:Team)-[:PLAYED_IN]->(:Match)
(:Person)-[:REPRESENTS]->(:Team)
(:Person)-[:SCORED_GOAL]->(:Match)"""
question = ("Retrieve the names of all teams that participated in the 'Germany 2011' tournament, "
            "along with the names of the players who represented those teams.")

print(cypher.generate(schema, question, convention="mtq"))

The model answers this Mind the Query test question with

MATCH (t:Team)-[:PARTICIPATED_IN]->(t2:Tournament {name: 'Germany 2011'})
MATCH (t)<-[:REPRESENTS]-(p:Person)
RETURN t.name AS teamName, p.name AS personName

which returns the same rows as the benchmark's reference query. convention="mtq" asks for that benchmark's answer conventions ("cypherbench" and "zograscope" are the others); leave it out for your own graph.

With transformers alone, the prompt is a system instruction and the schema followed by the question:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "cheonai/cheon-cypher-0.8b-v1"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.float16).to("cuda").eval()

SYSTEM = (
    "You translate a question about a Neo4j property graph into one Cypher query.\n"
    "Use only the node labels, relationship types, relationship directions and property keys "
    "that appear in the schema, spelled exactly as written there.\n"
    "Answer with the Cypher query only."
)
chat = [
    {"role": "system", "content": SYSTEM},
    {"role": "user", "content": f"Schema:\n{schema}\n\nQuestion: {question}"},
]
ids = tokenizer.apply_chat_template(chat, add_generation_prompt=True, enable_thinking=False,
                                    return_tensors="pt", return_dict=False).to("cuda")
out = model.generate(ids, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(out[0, ids.shape[1]:], skip_special_tokens=True).strip())

A benchmark's conventions go in a Rules: block between the schema and the question (cheon_cypher.prompt.CONVENTIONS).

Schema

The schema is the text form of LangChain's Neo4jGraph.schema (node properties, relationship properties and the relationships with their directions), which can be pasted as it is. The package also reads LangChain's enhanced schema, the JSON of APOC's apoc.meta.schema() and a JSON of nodes and relationships, and turns them into that text.

Specifications

Parameters 752.4M
Weights float16 (model.safetensors, 1.50 GB)
Base model Qwen/Qwen3.5-0.8B (Apache-2.0)

Requirements

transformers 5.18.0 and torch. On a CUDA GPU, flash-linear-attention and fla-core add the kernels the model runs fastest with; without them it runs in plain PyTorch, as on a CPU.

License

CC-BY-NC-4.0, for research and evaluation only. Contact us for commercial use. The base model (Qwen/Qwen3.5-0.8B) is Apache-2.0, but this fine-tune (learned weights) is ours and ships under the license above.

Downloads last month
488
Safetensors
Model size
0.8B params
Tensor type
F16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for cheonai/cheon-cypher-0.8b-v1

Finetuned
(605)
this model