Instructions to use mlabonne/NeuralBeagle14-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlabonne/NeuralBeagle14-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mlabonne/NeuralBeagle14-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mlabonne/NeuralBeagle14-7B") model = AutoModelForCausalLM.from_pretrained("mlabonne/NeuralBeagle14-7B") 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
- vLLM
How to use mlabonne/NeuralBeagle14-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlabonne/NeuralBeagle14-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlabonne/NeuralBeagle14-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mlabonne/NeuralBeagle14-7B
- SGLang
How to use mlabonne/NeuralBeagle14-7B 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 "mlabonne/NeuralBeagle14-7B" \ --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": "mlabonne/NeuralBeagle14-7B", "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 "mlabonne/NeuralBeagle14-7B" \ --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": "mlabonne/NeuralBeagle14-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mlabonne/NeuralBeagle14-7B with Docker Model Runner:
docker model run hf.co/mlabonne/NeuralBeagle14-7B
Quantized version please
Thanks! Currently making one, it's gonna be uploaded in a few minutes + a chat space to give it a try.
That's great. I'm waiting for both files and chat space.
Sorry it failed. It'll be uploaded in 5-6 hours
Meanwhile you can try my humble attempt sudhir2016/NeuralBeagle14-7B-GGUF till the original work from the master himself is available !!
Thanks @sudhir2016 ! The space is now available here: https://huggingface.co/spaces/mlabonne/NeuralBeagle14-7B-GGUF-Chat (GGUF: https://huggingface.co/mlabonne/NeuralBeagle14-7B-GGUF).
@mlabonne Q4_K_M or Q5_K_M for 7b models? is their amy significant difference? i see that earlier the space was running the Q5 model but you switched to Q4
@mlabonne Q4_K_M or Q5_K_M for 7b models? is their amy significant difference? i see that earlier the space was running the Q5 model but you switched to Q4
Q5_K_M is slightly better, I changed it because the inference was too slow on a CPU.
Thank you @mlabonne for the GGUF version. I really like it! My request is done, but I just don't close the discussion because of the questions asked by pother users.
Thanks @HR1777 sure let's keep it open