BeastxD/text2cypher_lora_v3

TEXT GENERATIONPricing:Input $0.4 / Cached $0.08 / Output $0.8Concurrent Unit Cost:1Model Size:4BQuant:BF16Context Size:32kTool Calling:SupportedPublished:Aug 9, 2026License:apache-2.0Architecture:Transformer Open Weights Featherless Exclusive Cold

BeastxD/text2cypher_lora_v3 is a 4 billion parameter Qwen3-4B-Instruct-2507 fine-tuned model (LoRA, merged 16-bit) developed by BeastxD. It specializes in converting natural language questions and graph schema descriptions into Cypher queries for Neo4j graph databases. This model is specifically designed to handle arbitrary domains and schemas by requiring the graph schema in the system prompt, making it adaptable beyond its training data. It achieves a semantic match score of 59.3% and a core logic match of 81.1% on its evaluation dataset.

Loading preview...

Overview

BeastxD/text2cypher_lora_v3 is a 4 billion parameter model, fine-tuned from Qwen3-4B-Instruct-2507 using LoRA (merged 16-bit). Its primary function is to translate natural language questions and a provided graph schema into Cypher queries for Neo4j databases. A key differentiator is its reliance on the graph schema being supplied in the system prompt, allowing it to generate queries for diverse and unseen graph structures, rather than being limited to a fixed schema.

Key Capabilities

  • Natural Language to Cypher Translation: Converts user questions into executable Cypher queries.
  • Schema-Agnostic Query Generation: Adapts to any provided graph schema, enabling broad applicability across different graph database instances.
  • Specific Prompt Format: Requires a structured system prompt containing the graph schema for optimal performance.

Performance and Limitations

Evaluations show a semantic match score of 59.3% (logically equivalent to gold standard) and a core logic match of 81.1% (correct schema navigation). The exact_match score is a misleadingly low 6.7% due to strict string comparison. Known limitations include occasional confusion between relationship types and property paths, dropping temporal/grouping qualifiers, and issues with sorting string-typed ordinal enums. For production use, it's recommended to wrap generation with a schema-grounding check-and-retry mechanism.

Training Details

The model was trained on a synthetic dataset of 2,698 QA-audited rows, covering 36 domains and 180 unique schemas. The training utilized 4-bit quantization with rank-16 LoRA, targeting all attention and MLP projections.