Instructions to use Locutusque/llama-3-neural-chat-v2.2-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Locutusque/llama-3-neural-chat-v2.2-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Locutusque/llama-3-neural-chat-v2.2-8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Locutusque/llama-3-neural-chat-v2.2-8B") model = AutoModelForCausalLM.from_pretrained("Locutusque/llama-3-neural-chat-v2.2-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
- vLLM
How to use Locutusque/llama-3-neural-chat-v2.2-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Locutusque/llama-3-neural-chat-v2.2-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": "Locutusque/llama-3-neural-chat-v2.2-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Locutusque/llama-3-neural-chat-v2.2-8B
- SGLang
How to use Locutusque/llama-3-neural-chat-v2.2-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 "Locutusque/llama-3-neural-chat-v2.2-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": "Locutusque/llama-3-neural-chat-v2.2-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 "Locutusque/llama-3-neural-chat-v2.2-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": "Locutusque/llama-3-neural-chat-v2.2-8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Locutusque/llama-3-neural-chat-v2.2-8B with Docker Model Runner:
docker model run hf.co/Locutusque/llama-3-neural-chat-v2.2-8B
llama-3-neural-chat-v2.2-8b
Model Details
Model Description
I fine-tuned llama-3 8B on an approach similar to Intel's neural chat language model. I have slightly modified the data sources so it is stronger in coding, math, and writing. I use both SFT and DPO-Positive. DPO-Positive dramatically improves performance over DPO.
- Developed by: Locutusque
- Model type: Built with Meta Llama 3
- Language(s) (NLP): Many?
- License: Llama 3 license https://huggingface.co/meta-llama/Meta-Llama-3-8B/blob/main/LICENSE
Quants
GGUF: https://huggingface.co/bartowski/llama-3-neural-chat-v2.2-8B-GGUF
ExLlamaV2: https://huggingface.co/bartowski/llama-3-neural-chat-v2.2-8B-exl2
Uses
This model has great performance in writing, coding, and math.
Training Data
Recipe information will be coming soon. This language model's recipe is similar to Intel's Neural Chat.
Direct Use
Conversational AI. This model is also very uncensored, it will respond to pretty much any request regardless of the system prompt, use at your own risk.
Evaluations
| Tasks | Version | Filter | n-shot | Metric | Value | Stderr | |
|---|---|---|---|---|---|---|---|
| truthfulqa_mc2 | 2 | none | 0 | acc | 0.5232 | Β± | 0.0151 |
| gsm8k | 3 | strict-match | 5 | exact_match | 0.5974 | Β± | 0.0135 |
| flexible-extract | 5 | exact_match | 0.5974 | Β± | 0.0135 | ||
| agieval_nous | N/A | none | 0 | acc_norm | 0.3841 | Β± | 0.0094 |
| none | 0 | acc | 0.3802 | Β± | 0.0094 | ||
| - agieval_aqua_rat | 1 | none | 0 | acc | 0.2598 | Β± | 0.0276 |
| none | 0 | acc_norm | 0.2520 | Β± | 0.0273 | ||
| - agieval_logiqa_en | 1 | none | 0 | acc | 0.3441 | Β± | 0.0186 |
| none | 0 | acc_norm | 0.3687 | Β± | 0.0189 | ||
| - agieval_lsat_ar | 1 | none | 0 | acc | 0.2217 | Β± | 0.0275 |
| none | 0 | acc_norm | 0.2348 | Β± | 0.0280 | ||
| - agieval_lsat_lr | 1 | none | 0 | acc | 0.3882 | Β± | 0.0216 |
| none | 0 | acc_norm | 0.3824 | Β± | 0.0215 | ||
| - agieval_lsat_rc | 1 | none | 0 | acc | 0.4944 | Β± | 0.0305 |
| none | 0 | acc_norm | 0.5019 | Β± | 0.0305 | ||
| - agieval_sat_en | 1 | none | 0 | acc | 0.6650 | Β± | 0.0330 |
| none | 0 | acc_norm | 0.6553 | Β± | 0.0332 | ||
| - agieval_sat_en_without_passage | 1 | none | 0 | acc | 0.3981 | Β± | 0.0342 |
| none | 0 | acc_norm | 0.3981 | Β± | 0.0342 | ||
| - agieval_sat_math | 1 | none | 0 | acc | 0.3500 | Β± | 0.0322 |
| none | 0 | acc_norm | 0.3318 | Β± | 0.0318 |
- Downloads last month
- 7
