Instructions to use AIuser112231/Llama3-8B-Web3-Audit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AIuser112231/Llama3-8B-Web3-Audit with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("NousResearch/Meta-Llama-3-8B") model = PeftModel.from_pretrained(base_model, "AIuser112231/Llama3-8B-Web3-Audit") - Transformers
How to use AIuser112231/Llama3-8B-Web3-Audit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AIuser112231/Llama3-8B-Web3-Audit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AIuser112231/Llama3-8B-Web3-Audit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AIuser112231/Llama3-8B-Web3-Audit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AIuser112231/Llama3-8B-Web3-Audit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AIuser112231/Llama3-8B-Web3-Audit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AIuser112231/Llama3-8B-Web3-Audit
- SGLang
How to use AIuser112231/Llama3-8B-Web3-Audit 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 "AIuser112231/Llama3-8B-Web3-Audit" \ --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": "AIuser112231/Llama3-8B-Web3-Audit", "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 "AIuser112231/Llama3-8B-Web3-Audit" \ --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": "AIuser112231/Llama3-8B-Web3-Audit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AIuser112231/Llama3-8B-Web3-Audit with Docker Model Runner:
docker model run hf.co/AIuser112231/Llama3-8B-Web3-Audit
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 3.0, | |
| "eval_steps": 500, | |
| "global_step": 42, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.37735849056603776, | |
| "grad_norm": 0.6055235266685486, | |
| "learning_rate": 0.0001955572805786141, | |
| "loss": 1.4222, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.7547169811320755, | |
| "grad_norm": 0.6678768992424011, | |
| "learning_rate": 0.000178183148246803, | |
| "loss": 1.2074, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 1.0754716981132075, | |
| "grad_norm": 0.7173440456390381, | |
| "learning_rate": 0.00015000000000000001, | |
| "loss": 1.0679, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 1.4528301886792452, | |
| "grad_norm": 0.5845156908035278, | |
| "learning_rate": 0.00011490422661761744, | |
| "loss": 0.8821, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 1.830188679245283, | |
| "grad_norm": 0.6559388637542725, | |
| "learning_rate": 7.774790660436858e-05, | |
| "loss": 0.9135, | |
| "step": 25 | |
| }, | |
| { | |
| "epoch": 2.150943396226415, | |
| "grad_norm": 0.6896112561225891, | |
| "learning_rate": 4.3667994193637796e-05, | |
| "loss": 0.8115, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 2.5283018867924527, | |
| "grad_norm": 0.9695717096328735, | |
| "learning_rate": 1.7376122568400532e-05, | |
| "loss": 0.7526, | |
| "step": 35 | |
| }, | |
| { | |
| "epoch": 2.9056603773584904, | |
| "grad_norm": 0.6637054681777954, | |
| "learning_rate": 2.5072087818176382e-06, | |
| "loss": 0.7661, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "step": 42, | |
| "total_flos": 2.674932293881037e+16, | |
| "train_loss": 0.972808321317037, | |
| "train_runtime": 285.5422, | |
| "train_samples_per_second": 2.206, | |
| "train_steps_per_second": 0.147 | |
| } | |
| ], | |
| "logging_steps": 5, | |
| "max_steps": 42, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 3, | |
| "save_steps": 100, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 2.674932293881037e+16, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |