ALI-USER commited on
Commit
fc98a74
·
verified ·
1 Parent(s): 500880d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -11
README.md CHANGED
@@ -1,23 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Model Card for RL-GRPO-SQL-Model
2
 
3
  ## Model Details
4
 
5
  ### Model Description
6
- - **Model type**: Fine-tuned Model with RL
7
- - **Training approach**: Reinforcement Learning with GRPO
8
- - **Task**: SQL generation/understanding
9
  - **Developed by**: Ali Assi
10
 
11
  ## Training Data
12
 
13
  - **Data sources**: Spider train set
14
- - **Preprocessing**: parsing and validation
15
-
16
- ## Model Performance
17
-
18
- ### Benchmarks
19
-
20
- Spider test set
21
 
22
  ## How to Use
23
 
@@ -26,4 +33,30 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
26
 
27
  tokenizer = AutoTokenizer.from_pretrained("ALI-USER/rl-grpo-sql-model")
28
  model = AutoModelForCausalLM.from_pretrained("ALI-USER/rl-grpo-sql-model")
29
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - sql
5
+ - code-generation
6
+ - reinforcement-learning
7
+ - text-generation
8
+ datasets:
9
+ - spider
10
+
11
+ ---
12
+
13
  # Model Card for RL-GRPO-SQL-Model
14
 
15
  ## Model Details
16
 
17
  ### Model Description
18
+ - **Model type**: Fine-tuned Causal Language Model with Reinforcement Learning
19
+ - **Training approach**: Reinforcement Learning with GRPO (Group Relative Policy Optimization)
20
+ - **Task**: SQL generation and understanding
21
  - **Developed by**: Ali Assi
22
 
23
  ## Training Data
24
 
25
  - **Data sources**: Spider train set
26
+ - **Preprocessing**: Parsing and validation
27
+ - **Languages**: English
 
 
 
 
 
28
 
29
  ## How to Use
30
 
 
33
 
34
  tokenizer = AutoTokenizer.from_pretrained("ALI-USER/rl-grpo-sql-model")
35
  model = AutoModelForCausalLM.from_pretrained("ALI-USER/rl-grpo-sql-model")
36
+
37
+ # Example usage
38
+ prompt = "Generate SQL for: Find all customers with orders over $100"
39
+ inputs = tokenizer(prompt, return_tensors="pt")
40
+ outputs = model.generate(**inputs, max_length=512)
41
+ print(tokenizer.decode(outputs[0]))
42
+ ```
43
+
44
+ ## Limitations
45
+
46
+ - Model performance may vary depending on database schema complexity
47
+
48
+ ## Ethical Considerations
49
+
50
+ - May generate SQL queries that are inefficient or unsafe if not properly validated
51
+ - Should be used with query validation before execution
52
+
53
+ ## Intended Uses
54
+
55
+ **Primary use cases:**
56
+ - Natural language to SQL translation
57
+ - SQL code generation assistance
58
+ - Educational purposes for SQL understanding
59
+
60
+ **Out-of-scope uses:**
61
+ - Direct production deployment without query validation
62
+ - Non-English language queries (not trained for this)