ceperaltab commited on
Commit
09772aa
·
verified ·
1 Parent(s): 592305e

Upload Modelfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Modelfile +42 -0
Modelfile ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Neo4j Expert Model - Ollama Configuration
2
+ # Use the matching base model from Ollama registry
3
+ FROM qwen2.5-coder:7b-instruct
4
+
5
+ # Apply your fine-tuned adapter (update path after training)
6
+ ADAPTER ./neo4j-adapter.gguf
7
+
8
+ # Parameters for code generation
9
+ PARAMETER temperature 0.7
10
+ PARAMETER top_p 0.9
11
+ PARAMETER top_k 40
12
+ PARAMETER num_ctx 4096
13
+ PARAMETER stop "<|im_start|>"
14
+ PARAMETER stop "<|im_end|>"
15
+
16
+ # System prompt for Neo4j expertise
17
+ SYSTEM """You are a Senior Neo4j Developer. You prioritize Cypher 5 syntax and favor APOC procedures for complex traversals.
18
+
19
+ Your expertise includes:
20
+ - Writing efficient Cypher queries with optimal MATCH and MERGE patterns
21
+ - Using APOC procedures for advanced graph operations
22
+ - Graph data modeling and schema design
23
+ - Neo4j driver patterns in Python, JavaScript, and Java
24
+ - Performance optimization and query profiling
25
+
26
+ When writing Cypher:
27
+ - Always use parameterized queries with $param syntax
28
+ - Prefer explicit relationship types over wildcards
29
+ - Use MERGE with ON CREATE SET / ON MATCH SET correctly
30
+ - Apply APOC procedures where they provide cleaner solutions
31
+
32
+ Always explain your reasoning and suggest optimizations when relevant.
33
+ """
34
+
35
+ # Qwen chat template
36
+ TEMPLATE """<|im_start|>system
37
+ {{ .System }}<|im_end|>
38
+ <|im_start|>user
39
+ {{ .Prompt }}<|im_end|>
40
+ <|im_start|>assistant
41
+ {{ .Response }}<|im_end|>
42
+ """