Text Generation
Transformers
PyTorch
TensorBoard
Safetensors
llama
Generated from Trainer
unsloth
trl
sft
conversational
text-generation-inference
Instructions to use FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python") model = AutoModelForCausalLM.from_pretrained("FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python
- SGLang
How to use FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python 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 "FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python" \ --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": "FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python", "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 "FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python" \ --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": "FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python", max_seq_length=2048, ) - Docker Model Runner
How to use FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python with Docker Model Runner:
docker model run hf.co/FYPFAST/Llama-3.2-3B-Instruct-PEP8-Vulnerability-Python
Training in progress, step 60
Browse files- adapter_config.json +5 -5
- adapter_model.safetensors +2 -2
- runs/Nov16_08-08-55_f91566f5c1dd/events.out.tfevents.1731744545.f91566f5c1dd.1096.0 +3 -0
- runs/Nov16_08-25-14_f91566f5c1dd/events.out.tfevents.1731745528.f91566f5c1dd.6943.0 +3 -0
- runs/Nov16_09-32-58_f91566f5c1dd/events.out.tfevents.1731749588.f91566f5c1dd.23057.0 +3 -0
- tokenizer.json +2 -2
- tokenizer_config.json +1 -1
- training_args.bin +1 -1
adapter_config.json
CHANGED
|
@@ -23,13 +23,13 @@
|
|
| 23 |
"rank_pattern": {},
|
| 24 |
"revision": null,
|
| 25 |
"target_modules": [
|
| 26 |
-
"
|
| 27 |
-
"o_proj",
|
| 28 |
-
"up_proj",
|
| 29 |
"q_proj",
|
| 30 |
-
"v_proj",
|
| 31 |
"gate_proj",
|
| 32 |
-
"
|
|
|
|
|
|
|
|
|
|
| 33 |
],
|
| 34 |
"task_type": "CAUSAL_LM",
|
| 35 |
"use_dora": false,
|
|
|
|
| 23 |
"rank_pattern": {},
|
| 24 |
"revision": null,
|
| 25 |
"target_modules": [
|
| 26 |
+
"k_proj",
|
|
|
|
|
|
|
| 27 |
"q_proj",
|
|
|
|
| 28 |
"gate_proj",
|
| 29 |
+
"v_proj",
|
| 30 |
+
"o_proj",
|
| 31 |
+
"up_proj",
|
| 32 |
+
"down_proj"
|
| 33 |
],
|
| 34 |
"task_type": "CAUSAL_LM",
|
| 35 |
"use_dora": false,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2dc91fc223a6377ee863a0abb149728697782c9c28d1f8363fbdf82254cc3ca6
|
| 3 |
+
size 1965084424
|
runs/Nov16_08-08-55_f91566f5c1dd/events.out.tfevents.1731744545.f91566f5c1dd.1096.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e7ec1a9c9054a892b5a7c51b87c78f5d003624180b0109287e9e4a79bd1daddc
|
| 3 |
+
size 12214
|
runs/Nov16_08-25-14_f91566f5c1dd/events.out.tfevents.1731745528.f91566f5c1dd.6943.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2a73b853c466cef9283ad9b9a9a342ee22a90c502a36ca795d1999880f3313d3
|
| 3 |
+
size 6151
|
runs/Nov16_09-32-58_f91566f5c1dd/events.out.tfevents.1731749588.f91566f5c1dd.23057.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6ac63a679ac4685d8dc74bad722e80fe533a5aeac7d6461a62c70cc86a323e48
|
| 3 |
+
size 18883
|
tokenizer.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:145cc0211ce61596383d8ae33aa07aa5555cb220e67064f0e36bf4beaffa025d
|
| 3 |
+
size 17210200
|
tokenizer_config.json
CHANGED
|
@@ -2059,6 +2059,6 @@
|
|
| 2059 |
],
|
| 2060 |
"model_max_length": 131072,
|
| 2061 |
"pad_token": "<|finetune_right_pad_id|>",
|
| 2062 |
-
"padding_side": "
|
| 2063 |
"tokenizer_class": "PreTrainedTokenizerFast"
|
| 2064 |
}
|
|
|
|
| 2059 |
],
|
| 2060 |
"model_max_length": 131072,
|
| 2061 |
"pad_token": "<|finetune_right_pad_id|>",
|
| 2062 |
+
"padding_side": "left",
|
| 2063 |
"tokenizer_class": "PreTrainedTokenizerFast"
|
| 2064 |
}
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5624
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad69ee27051096c839f1214bc55b691f5bb6638ddb765ff50c1b927269bfec70
|
| 3 |
size 5624
|