Instructions to use vhab10/llama-3-8b-merged-linear with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vhab10/llama-3-8b-merged-linear with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="vhab10/llama-3-8b-merged-linear") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("vhab10/llama-3-8b-merged-linear") model = AutoModelForCausalLM.from_pretrained("vhab10/llama-3-8b-merged-linear", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vhab10/llama-3-8b-merged-linear with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vhab10/llama-3-8b-merged-linear" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vhab10/llama-3-8b-merged-linear", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/vhab10/llama-3-8b-merged-linear
- SGLang
How to use vhab10/llama-3-8b-merged-linear 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 "vhab10/llama-3-8b-merged-linear" \ --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": "vhab10/llama-3-8b-merged-linear", "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 "vhab10/llama-3-8b-merged-linear" \ --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": "vhab10/llama-3-8b-merged-linear", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use vhab10/llama-3-8b-merged-linear with Docker Model Runner:
docker model run hf.co/vhab10/llama-3-8b-merged-linear
llama-3-8b-merged-linear
Overview
This model represents a linear merge of three distinct Llama 3-8b models using the Mergekit tool. The primary goal of this merge is to leverage the unique strengths of each base model, such as multilingual capabilities and specialized domain knowledge, into a more versatile and generalized language model.
By merging these models linearly, we combine their expertise into a unified model that performs well across various tasks, such as text generation, multilingual understanding, and domain-specific tasks.
Model Details
Model Description
Models Used:
- Danielbrdz/Barcenas-Llama3-8b-ORPO
- DeepMount00/Llama-3-8b-Ita
- lightblue/suzume-llama-3-8B-multilingual
Merging Tool: Mergekit
Merge Method: Linear merge with equal weighting (1.0) for all models
Tokenizer Source: Union
Data Type: float16 (FP16) precision
License: MIT License
Languages Supported: Multilingual, including English, Italian, and potentially others from the multilingual base models
Configuration
The following YAML configuration was used to produce this model:
models:
- model: Danielbrdz/Barcenas-Llama3-8b-ORPO
parameters:
weight: 1.0
- model: DeepMount00/Llama-3-8b-Ita
parameters:
weight: 1.0
- model: lightblue/suzume-llama-3-8B-multilingual
parameters:
weight: 1.0
merge_method: linear
tokenizer_source: union
dtype: float16
- Downloads last month
- 18
Model tree for vhab10/llama-3-8b-merged-linear
Base model
meta-llama/Meta-Llama-3-8B