Instructions to use agentlans/Llama3-Prime with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use agentlans/Llama3-Prime with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="agentlans/Llama3-Prime") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("agentlans/Llama3-Prime") model = AutoModelForCausalLM.from_pretrained("agentlans/Llama3-Prime") 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 agentlans/Llama3-Prime with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "agentlans/Llama3-Prime" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "agentlans/Llama3-Prime", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/agentlans/Llama3-Prime
- SGLang
How to use agentlans/Llama3-Prime 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 "agentlans/Llama3-Prime" \ --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": "agentlans/Llama3-Prime", "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 "agentlans/Llama3-Prime" \ --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": "agentlans/Llama3-Prime", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use agentlans/Llama3-Prime with Docker Model Runner:
docker model run hf.co/agentlans/Llama3-Prime
Llama3-Prime
This Llama 3 8B model is a merge of other pretrained Llama 3 language models that were optimized for user preference. As a result, this merged model should be strong at providing relevant answers to user queries. Here, usability is more important than beating benchmarks.
- Input: text only
- Output: text only
- Prompt format: Llama 3
- Language: English
This model was created by merging multiple models with equal weights through the use of MergeKit's model_stock method.
Base Model: Daredevil-8B
Models Used:
- Llama-3-Instruct-8B-SimPO-ExPO
- Llama-3-8B-Magpie-Pro-SFT-v0.1
- SELM-Llama-3-8B-Instruct-iter-3
- LLaMA3-iterative-DPO-final-ExPO
- Llama-3-Instruct-8B-SPPO-Iter3
- MAmmoTH2-8B-Plus
- Bagel-8b-v1.0
Training Details:
The merged model was trained using LLaMA Factory on the alpaca_en_demo dataset to ensure the model can respond in the Llama 3 Instruct format. The training parameters included a rank of 1, an alpha value of 1, and a 0.3 dropout rate. In other words, very weak training to prevent interfering with the merged model's capabilities.
- Downloads last month
- 4
docker model run hf.co/agentlans/Llama3-Prime