Instructions to use mistral-hackaton-2026/Mistral_SmartContract_Security with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mistral-hackaton-2026/Mistral_SmartContract_Security with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3") model = PeftModel.from_pretrained(base_model, "mistral-hackaton-2026/Mistral_SmartContract_Security") - Transformers
How to use mistral-hackaton-2026/Mistral_SmartContract_Security with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mistral-hackaton-2026/Mistral_SmartContract_Security") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mistral-hackaton-2026/Mistral_SmartContract_Security", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mistral-hackaton-2026/Mistral_SmartContract_Security with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mistral-hackaton-2026/Mistral_SmartContract_Security" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mistral-hackaton-2026/Mistral_SmartContract_Security", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mistral-hackaton-2026/Mistral_SmartContract_Security
- SGLang
How to use mistral-hackaton-2026/Mistral_SmartContract_Security 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 "mistral-hackaton-2026/Mistral_SmartContract_Security" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mistral-hackaton-2026/Mistral_SmartContract_Security", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "mistral-hackaton-2026/Mistral_SmartContract_Security" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mistral-hackaton-2026/Mistral_SmartContract_Security", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mistral-hackaton-2026/Mistral_SmartContract_Security with Docker Model Runner:
docker model run hf.co/mistral-hackaton-2026/Mistral_SmartContract_Security
Fix: Remove PEFT 0.18+ parameters for compatibility with v0.10
Browse files- adapter_config.json +31 -46
adapter_config.json
CHANGED
|
@@ -1,46 +1,31 @@
|
|
| 1 |
-
{
|
| 2 |
-
"
|
| 3 |
-
"
|
| 4 |
-
"
|
| 5 |
-
"
|
| 6 |
-
"
|
| 7 |
-
"
|
| 8 |
-
"
|
| 9 |
-
"
|
| 10 |
-
"
|
| 11 |
-
"
|
| 12 |
-
"
|
| 13 |
-
"
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
"
|
| 29 |
-
"
|
| 30 |
-
"
|
| 31 |
-
|
| 32 |
-
"k_proj",
|
| 33 |
-
"gate_proj",
|
| 34 |
-
"v_proj",
|
| 35 |
-
"down_proj",
|
| 36 |
-
"q_proj",
|
| 37 |
-
"o_proj",
|
| 38 |
-
"up_proj"
|
| 39 |
-
],
|
| 40 |
-
"target_parameters": null,
|
| 41 |
-
"task_type": "CAUSAL_LM",
|
| 42 |
-
"trainable_token_indices": null,
|
| 43 |
-
"use_dora": false,
|
| 44 |
-
"use_qalora": false,
|
| 45 |
-
"use_rslora": false
|
| 46 |
-
}
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "mistralai/Mistral-7B-Instruct-v0.3",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"fan_in_fan_out": false,
|
| 7 |
+
"inference_mode": true,
|
| 8 |
+
"init_lora_weights": true,
|
| 9 |
+
"layers_pattern": null,
|
| 10 |
+
"layers_to_transform": null,
|
| 11 |
+
"loftq_config": {},
|
| 12 |
+
"lora_alpha": 16,
|
| 13 |
+
"lora_dropout": 0.05,
|
| 14 |
+
"modules_to_save": null,
|
| 15 |
+
"peft_type": "LORA",
|
| 16 |
+
"r": 16,
|
| 17 |
+
"rank_pattern": {},
|
| 18 |
+
"revision": null,
|
| 19 |
+
"target_modules": [
|
| 20 |
+
"k_proj",
|
| 21 |
+
"gate_proj",
|
| 22 |
+
"v_proj",
|
| 23 |
+
"down_proj",
|
| 24 |
+
"q_proj",
|
| 25 |
+
"o_proj",
|
| 26 |
+
"up_proj"
|
| 27 |
+
],
|
| 28 |
+
"task_type": "CAUSAL_LM",
|
| 29 |
+
"use_dora": false,
|
| 30 |
+
"use_rslora": false
|
| 31 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|