Downloads · 30 days
0
SatyamSinghal/tinyllama-mlx-lora-scv-1b
tinyllama-mlx-lora-scv-1b is a machine learning model from SatyamSinghal. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for mlx. The card lists the license as other.
This is a LoRA adapter trained to help spot common smart contract issues (Solidity). It produces short, explainable findings. It runs locally on Apple Silicon using MLX.
Downloads · 30 days
0
Access
Public
Updated Apr 12, 2026
Repo size
73.5 MB
Likes
1
Public
Click a slice to open those files.
.safetensors91.9 MB · 100%
From the Hugging Face model README
This is a LoRA adapter trained to help spot common smart contract issues (Solidity). It produces short, explainable findings. It runs locally on Apple Silicon using MLX.
Option A — Download adapter from Hub
from huggingface_hub import snapshot_download
from mlx_lm import load, generate
adapter_dir = snapshot_download("SatyamSinghal/tinyllama-mlx-lora-scv-1b")
model, tokenizer = load("TinyLlama/TinyLlama-1.1B-Chat-v1.0", adapter_path=adapter_dir)
prompt = (
"You are a smart contract security auditor. Analyze the following Solidity code "
"and list vulnerabilities, explanations, and PoC if relevant.\n"
"Contract:\n"
"function withdraw() public { require(balances[msg.sender] > 0); "
"(bool success,) = msg.sender.call.value(balances[msg.sender])(\"\"); "
"require(success); balances[msg.sender] = 0; }"
)
print(generate(model, tokenizer, prompt, max_tokens=200))
Option B — Use local adapter folder
from mlx_lm import load, generate
model, tokenizer = load("TinyLlama/TinyLlama-1.1B-Chat-v1.0", adapter_path="out/tinyllama_scv_lora")
print(generate(model, tokenizer, "List two reentrancy risks in withdraw patterns.", max_tokens=120))
Reproduce (CLI):
python -m mlx_lm lora \
--model TinyLlama/TinyLlama-1.1B-Chat-v1.0 \
--train \
--data /path/to/data/scv/train \
--batch-size 8 \
--iters 400 \
--learning-rate 2e-4 \
--adapter-path out/tinyllama_scv_lora