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
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: llama3
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: llama3
|
| 3 |
+
---
|
| 4 |
+
# Llama3-Prime
|
| 5 |
+
|
| 6 |
+
This [Llama 3 8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) 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.
|
| 7 |
+
|
| 8 |
+
- Input: text only
|
| 9 |
+
- Output: text only
|
| 10 |
+
- Prompt format: Llama 3
|
| 11 |
+
- Language: English
|
| 12 |
+
|
| 13 |
+
This model was created by merging multiple models with equal weights through the use of [MergeKit's](https://github.com/arcee-ai/mergekit) `model_stock` method.
|
| 14 |
+
|
| 15 |
+
Base Model: [Daredevil-8B](https://huggingface.co/mlabonne/Daredevil-8B)
|
| 16 |
+
|
| 17 |
+
Models Used:
|
| 18 |
+
- [Llama-3-Instruct-8B-SimPO-ExPO](https://huggingface.co/chujiezheng/Llama-3-Instruct-8B-SimPO-ExPO)
|
| 19 |
+
- [Llama-3-8B-Magpie-Pro-SFT-v0.1](https://huggingface.co/Magpie-Align/Llama-3-8B-Magpie-Pro-SFT-v0.1)
|
| 20 |
+
- [SELM-Llama-3-8B-Instruct-iter-3](https://huggingface.co/ZhangShenao/SELM-Llama-3-8B-Instruct-iter-3)
|
| 21 |
+
- [LLaMA3-iterative-DPO-final-ExPO](https://huggingface.co/chujiezheng/LLaMA3-iterative-DPO-final-ExPO)
|
| 22 |
+
- [Llama-3-Instruct-8B-SPPO-Iter3](https://huggingface.co/UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter3)
|
| 23 |
+
- [MAmmoTH2-8B-Plus](https://huggingface.co/TIGER-Lab/MAmmoTH2-8B-Plus)
|
| 24 |
+
- [Bagel-8b-v1.0](https://huggingface.co/jondurbin/bagel-8b-v1.0)
|
| 25 |
+
|
| 26 |
+
Training Details:
|
| 27 |
+
|
| 28 |
+
The merged model was trained using [LLaMA Factory](https://github.com/hiyouga/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.
|