Instructions to use AquilaX-AI/NL-JSON-Start-Scan with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AquilaX-AI/NL-JSON-Start-Scan with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AquilaX-AI/NL-JSON-Start-Scan")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("AquilaX-AI/NL-JSON-Start-Scan") model = AutoModelForSeq2SeqLM.from_pretrained("AquilaX-AI/NL-JSON-Start-Scan", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AquilaX-AI/NL-JSON-Start-Scan with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AquilaX-AI/NL-JSON-Start-Scan" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AquilaX-AI/NL-JSON-Start-Scan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AquilaX-AI/NL-JSON-Start-Scan
- SGLang
How to use AquilaX-AI/NL-JSON-Start-Scan with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "AquilaX-AI/NL-JSON-Start-Scan" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AquilaX-AI/NL-JSON-Start-Scan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "AquilaX-AI/NL-JSON-Start-Scan" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AquilaX-AI/NL-JSON-Start-Scan", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AquilaX-AI/NL-JSON-Start-Scan with Docker Model Runner:
docker model run hf.co/AquilaX-AI/NL-JSON-Start-Scan
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,12 +2,33 @@
|
|
| 2 |
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
---
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
```bash
|
| 7 |
pip install transformers[torch]
|
| 8 |
```
|
| 9 |
|
| 10 |
-
##
|
| 11 |
```python
|
| 12 |
import json
|
| 13 |
import requests
|
|
@@ -104,4 +125,14 @@ except:
|
|
| 104 |
end = time.time()
|
| 105 |
print(to_return)
|
| 106 |
print(f"Time taken: {end - start}")
|
| 107 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
license: apache-2.0
|
| 4 |
---
|
| 5 |
+
|
| 6 |
+
# AquilaX-NL-JSON-Start-Scan
|
| 7 |
+
|
| 8 |
+
## Overview
|
| 9 |
+
AquilaX-NL-JSON-Start-Scan is a model built using Hugging Face's T5-small to convert natural language queries about vulnerabilities into JSON queries for MongoDB.
|
| 10 |
+
|
| 11 |
+
## Model Information
|
| 12 |
+
|
| 13 |
+
### Model
|
| 14 |
+
- **Name**: AquilaX-NL-JSON-Start-Scan
|
| 15 |
+
- **Architecture**: T5-small
|
| 16 |
+
- **Framework**: Hugging Face Transformers
|
| 17 |
+
|
| 18 |
+
### Description
|
| 19 |
+
The AquilaX-NL-JSON-Start-Scan model is designed to interpret natural language queries related to vulnerabilities in code and convert them into JSON queries that can be executed on a MongoDB database. This facilitates automated scanning and analysis of code repositories for security issues. The model leverages the capabilities of the T5-small architecture, which is well-suited for natural language understanding and generation tasks.
|
| 20 |
+
|
| 21 |
+
# Getting Started
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
Below we share some code snippets on how to get quickly started with running the model. First make sure to pip install -U transformers[torch], then copy the snippet from the section.
|
| 25 |
+
|
| 26 |
+
## Requirements
|
| 27 |
```bash
|
| 28 |
pip install transformers[torch]
|
| 29 |
```
|
| 30 |
|
| 31 |
+
## Inference Code
|
| 32 |
```python
|
| 33 |
import json
|
| 34 |
import requests
|
|
|
|
| 125 |
end = time.time()
|
| 126 |
print(to_return)
|
| 127 |
print(f"Time taken: {end - start}")
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
## License
|
| 131 |
+
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
|
| 132 |
+
|
| 133 |
+
## Authors
|
| 134 |
+
- [Aquilax-Ai](https://huggingface.co/AquilaX-AI)
|
| 135 |
+
|
| 136 |
+
## Acknowledgments
|
| 137 |
+
- Hugging Face for the Transformers library.
|
| 138 |
+
- Any other acknowledgments.
|