BeastxD/text2cypher_lora_v4_raw

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

BeastxD/text2cypher_lora_v4_raw is a 4 billion parameter Qwen3-4B-Instruct-2507 fine-tune (LoRA, merged 16-bit) designed to convert natural language questions and graph schema descriptions into Cypher queries. This model is specifically trained to handle arbitrary domains and schemas by requiring the graph schema in the system prompt. It excels at generating accurate Cypher queries for Neo4j graph databases based on provided schema definitions and user questions.

Loading preview...

Model Overview

BeastxD/text2cypher_lora_v4_raw 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 given graph schema into Cypher queries for Neo4j databases. A key differentiator is its ability to work with arbitrary graph schemas provided dynamically in the system prompt, rather than being limited to a fixed, pre-trained schema.

Key Capabilities

  • Cypher Query Generation: Converts natural language questions into executable Cypher queries.
  • Schema-Driven: Requires the graph schema to be provided in the system prompt, allowing for flexibility across diverse graph database structures.
  • Strict Schema Adherence: Generates queries strictly based on the provided schema, including node properties, relationship types, and directions.
  • Comprehensive Query Rules: Incorporates detailed rules for mapping questions to schema, handling filters, aggregations, ordering, and disambiguation.

Training and Dataset

The model was trained on a v4 dataset comprising 3,744 rows across 36 domains and 180 schemas. This dataset includes 2,698 QA-audited rows from v3 and 1,046 new rows targeting specific gap categories like multi-property returns, complex aggregations, and relationship disambiguation. The dataset has a complexity distribution of 66.5% easy, 6.9% medium, and 26.6% complex. All rows underwent deterministic schema-grounding and relationship-direction checks.

Important Usage Note

This model requires a specific prompt format where the graph schema is included in the system prompt. It will not function correctly with bare natural language questions without the schema context. An example of correct usage with transformers is provided in the model card, demonstrating how to apply the chat template with the system prompt containing the schema and the user prompt containing the question.