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 +1 -1
- runs/Nov16_11-38-14_efe386952d11/events.out.tfevents.1731757109.efe386952d11.588.0 +3 -0
- runs/Nov16_11-39-57_efe386952d11/events.out.tfevents.1731757210.efe386952d11.588.1 +3 -0
- runs/Nov16_11-45-05_efe386952d11/events.out.tfevents.1731757518.efe386952d11.7209.0 +3 -0
- runs/Nov16_11-46-38_efe386952d11/events.out.tfevents.1731757605.efe386952d11.7209.1 +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 |
-
"k_proj",
|
| 27 |
-
"q_proj",
|
| 28 |
-
"gate_proj",
|
| 29 |
"v_proj",
|
| 30 |
-
"
|
| 31 |
"up_proj",
|
| 32 |
-
"
|
|
|
|
|
|
|
|
|
|
| 33 |
],
|
| 34 |
"task_type": "CAUSAL_LM",
|
| 35 |
"use_dora": false,
|
|
|
|
| 23 |
"rank_pattern": {},
|
| 24 |
"revision": null,
|
| 25 |
"target_modules": [
|
|
|
|
|
|
|
|
|
|
| 26 |
"v_proj",
|
| 27 |
+
"q_proj",
|
| 28 |
"up_proj",
|
| 29 |
+
"k_proj",
|
| 30 |
+
"gate_proj",
|
| 31 |
+
"down_proj",
|
| 32 |
+
"o_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 1965084424
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:429e91fabc7a40d06d9fc1859d89e4fd634334d827f84a9bdb67387d7b49b7fc
|
| 3 |
size 1965084424
|
runs/Nov16_11-38-14_efe386952d11/events.out.tfevents.1731757109.efe386952d11.588.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b6af793939efe69778090ed1b380a3e01c6f4d40616e647d3741dfe570dadce5
|
| 3 |
+
size 6115
|
runs/Nov16_11-39-57_efe386952d11/events.out.tfevents.1731757210.efe386952d11.588.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:590d3167b5aafde304fd960d2b9352331854265971eacdcb3b41b05317339dbb
|
| 3 |
+
size 6115
|
runs/Nov16_11-45-05_efe386952d11/events.out.tfevents.1731757518.efe386952d11.7209.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b7baaacbee65f3f11813faa36a6e0c88d76cafe0f5cf9f65e559fbe57a5a593
|
| 3 |
+
size 6115
|
runs/Nov16_11-46-38_efe386952d11/events.out.tfevents.1731757605.efe386952d11.7209.1
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a86484e642d829afac32a34b7be2a168d943a261965c1d714af779a0d93a5aa7
|
| 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:7cc639fd5ec50c6d45a04d39c3b996331e67efd565ce98a917a2dcea0a04d14e
|
| 3 |
+
size 17210201
|
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": "right",
|
| 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:125fbf451327d2e170f8fa06f01f0c734b01b18d9f47bdf2a2583dbb2f8fa406
|
| 3 |
size 5624
|