Text Generation
Transformers
Safetensors
PyTorch
English
llama
meta
llama-3
mergekit
Merge
conversational
text-generation-inference
Instructions to use grimjim/llama-3-merge-pp-instruct-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use grimjim/llama-3-merge-pp-instruct-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="grimjim/llama-3-merge-pp-instruct-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("grimjim/llama-3-merge-pp-instruct-8B") model = AutoModelForMultimodalLM.from_pretrained("grimjim/llama-3-merge-pp-instruct-8B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use grimjim/llama-3-merge-pp-instruct-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "grimjim/llama-3-merge-pp-instruct-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "grimjim/llama-3-merge-pp-instruct-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/grimjim/llama-3-merge-pp-instruct-8B
- SGLang
How to use grimjim/llama-3-merge-pp-instruct-8B 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 "grimjim/llama-3-merge-pp-instruct-8B" \ --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": "grimjim/llama-3-merge-pp-instruct-8B", "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 "grimjim/llama-3-merge-pp-instruct-8B" \ --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": "grimjim/llama-3-merge-pp-instruct-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use grimjim/llama-3-merge-pp-instruct-8B with Docker Model Runner:
docker model run hf.co/grimjim/llama-3-merge-pp-instruct-8B
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,55 +1,54 @@
|
|
| 1 |
-
---
|
| 2 |
-
language:
|
| 3 |
-
- en
|
| 4 |
-
base_model:
|
| 5 |
-
- meta-llama/Meta-Llama-3-8B-Instruct
|
| 6 |
-
- ChaoticNeutrals/Poppy_Porpoise-0.72-L3-8B
|
| 7 |
-
library_name: transformers
|
| 8 |
-
tags:
|
| 9 |
-
- meta
|
| 10 |
-
- llama-3
|
| 11 |
-
- pytorch
|
| 12 |
-
- mergekit
|
| 13 |
-
- merge
|
| 14 |
-
license:
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
---
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
## Merge
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
* [
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
base_model:
|
| 5 |
+
- meta-llama/Meta-Llama-3-8B-Instruct
|
| 6 |
+
- ChaoticNeutrals/Poppy_Porpoise-0.72-L3-8B
|
| 7 |
+
library_name: transformers
|
| 8 |
+
tags:
|
| 9 |
+
- meta
|
| 10 |
+
- llama-3
|
| 11 |
+
- pytorch
|
| 12 |
+
- mergekit
|
| 13 |
+
- merge
|
| 14 |
+
license: cc-by-nc-4.0
|
| 15 |
+
pipeline_tag: text-generation
|
| 16 |
+
---
|
| 17 |
+
# llama-3-merge-pp-instruct-8B
|
| 18 |
+
|
| 19 |
+
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
|
| 20 |
+
|
| 21 |
+
Lightly tested at temperature=1.0, minP=0.02 with provisional Llama 3 Instruct prompts.
|
| 22 |
+
|
| 23 |
+
Built with Meta Llama 3.
|
| 24 |
+
|
| 25 |
+
## Merge Details
|
| 26 |
+
### Merge Method
|
| 27 |
+
|
| 28 |
+
This model was merged using the SLERP merge method.
|
| 29 |
+
|
| 30 |
+
### Models Merged
|
| 31 |
+
|
| 32 |
+
The following models were included in the merge:
|
| 33 |
+
* [meta-llama/Meta-Llama-3-8B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)
|
| 34 |
+
* [ChaoticNeutrals/Poppy_Porpoise-0.72-L3-8B](https://huggingface.co/ChaoticNeutrals/Poppy_Porpoise-0.72-L3-8B)
|
| 35 |
+
|
| 36 |
+
### Configuration
|
| 37 |
+
|
| 38 |
+
The following YAML configuration was used to produce this model:
|
| 39 |
+
|
| 40 |
+
```yaml
|
| 41 |
+
slices:
|
| 42 |
+
- sources:
|
| 43 |
+
- model: ChaoticNeutrals/Poppy_Porpoise-0.72-L3-8B
|
| 44 |
+
layer_range: [0,32]
|
| 45 |
+
- model: meta-llama/Meta-Llama-3-8B-Instruct
|
| 46 |
+
layer_range: [0,32]
|
| 47 |
+
merge_method: slerp
|
| 48 |
+
base_model: ChaoticNeutrals/Poppy_Porpoise-0.72-L3-8B
|
| 49 |
+
parameters:
|
| 50 |
+
t:
|
| 51 |
+
- value: 0.5
|
| 52 |
+
dtype: bfloat16
|
| 53 |
+
|
| 54 |
+
```
|
|
|