Text Generation
PEFT
Safetensors
Transformers
English
Turkish
lora
sft
trl
security
guardrails
multilingual
conversational
Instructions to use ApiFort/LLMFort-code_security with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ApiFort/LLMFort-code_security with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("sft_merged") model = PeftModel.from_pretrained(base_model, "ApiFort/LLMFort-code_security") - Transformers
How to use ApiFort/LLMFort-code_security with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ApiFort/LLMFort-code_security") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ApiFort/LLMFort-code_security", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ApiFort/LLMFort-code_security with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ApiFort/LLMFort-code_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": "ApiFort/LLMFort-code_security", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ApiFort/LLMFort-code_security
- SGLang
How to use ApiFort/LLMFort-code_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 "ApiFort/LLMFort-code_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": "ApiFort/LLMFort-code_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 "ApiFort/LLMFort-code_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": "ApiFort/LLMFort-code_security", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ApiFort/LLMFort-code_security with Docker Model Runner:
docker model run hf.co/ApiFort/LLMFort-code_security
- Xet hash:
- 020c5d13968cf9c097ed4857279e3bff23748f040ac5bafa52a4c57e304814e6
- Size of remote file:
- 85 MB
- SHA256:
- ff66f7a1b08c3347f83b14c90b68126316f3a62ca25e8f7dddd718cae44a7237
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.