Text Generation
Transformers
Safetensors
llama
mergekit
Merge
conversational
text-generation-inference
exl2
Instructions to use gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw") model = AutoModelForCausalLM.from_pretrained("gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw
- SGLang
How to use gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw 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 "gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw" \ --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": "gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw", "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 "gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw" \ --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": "gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw with Docker Model Runner:
docker model run hf.co/gbueno86/Meta-LLama-3-Cat-A-LLama-70b-exl2-2.55bpw
Upload mergekit_config.yml with huggingface_hub
Browse files- mergekit_config.yml +16 -0
mergekit_config.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
base_model: ../models/Undi95_Meta-Llama-3-70B-Instruct-hf
|
| 2 |
+
dtype: bfloat16
|
| 3 |
+
merge_method: slerp
|
| 4 |
+
parameters:
|
| 5 |
+
t:
|
| 6 |
+
- filter: self_attn
|
| 7 |
+
value: [0.0, 0.5, 0.3, 0.7, 1.0]
|
| 8 |
+
- filter: mlp
|
| 9 |
+
value: [1.0, 0.5, 0.7, 0.3, 0.0]
|
| 10 |
+
- value: 0.5
|
| 11 |
+
slices:
|
| 12 |
+
- sources:
|
| 13 |
+
- layer_range: [0, 80]
|
| 14 |
+
model: ../models/Undi95_Meta-Llama-3-70B-Instruct-hf
|
| 15 |
+
- layer_range: [0, 80]
|
| 16 |
+
model: ../models/turboderp_Cat-Llama-3-70B-instruct
|