Instructions to use israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set") model = AutoModelForCausalLM.from_pretrained("israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set
- SGLang
How to use israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set 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 "israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set with Docker Model Runner:
docker model run hf.co/israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set
Model Card for Model ID
Attempts to extract metadata; keywords, description and header count
Model Details
Model Description
- Developed by: Israel N.
- Model type: Llama-2-7B
- Language(s) (NLP): English
- License: Apache-2.0
- Finetuned from model [optional]: TinyPixel/Llama-2-7B-bf16-sharded
Uses
Direct Use
Expediting offline SEO analysis
Bias, Risks, and Limitations
Currently does not respond to site or metadata, might need a more refined dataset to work.
How to Get Started with the Model
!pip install -q -U trl transformers accelerate git+https://github.com/huggingface/peft.git
!pip install -q datasets bitsandbytes einops
Import and use the AutoModelForCausalLM.pretrained to load the model from "israelNwokedi/Llama2_Finetuned_SEO_Instruction_Set".
Training Details
Training Data
Prompts: Entire sites and backlinks scrapped from the web Outputs: Keywords, description, header counts (h1-h6).
These are the main components of the dataset. Additional samples are ChatGPT-generated metadata as prompts and the relevant outputs.
Training Procedure
Finetuning of pre-trained "TinyPixel/Llama-2-7B-bf16-sharded" huggingface model using LoRA and QLoRA.
Preprocessing [optional]
Used Transformers' BitsAndBytesConfig for lightweight model training and "TinyPixel/Llama-2-7B-bf16-sharded" tokenizer for encoding/decoding.
Training Hyperparameters
- Training regime: 4-bit precision
Testing Data, Factors & Metrics
Testing Data
Sampled from training data.
Metrics
Not yet computed.
[More Information Needed]
Results
Intial test attempted reconstructing another artiicial metadata as part of its text generation function however this was not the intended usecase.
Environmental Impact
- Hardware Type: Tesla T4
- Hours used: 0.5
- Cloud Provider: Google Colaboratory
- Compute Region: Eurpoe
- Carbon Emitted: 0.08
- Downloads last month
- 9