Instructions to use Nexusflow/NexusRaven-V2-13B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Nexusflow/NexusRaven-V2-13B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Nexusflow/NexusRaven-V2-13B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Nexusflow/NexusRaven-V2-13B") model = AutoModelForCausalLM.from_pretrained("Nexusflow/NexusRaven-V2-13B") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Nexusflow/NexusRaven-V2-13B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Nexusflow/NexusRaven-V2-13B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nexusflow/NexusRaven-V2-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Nexusflow/NexusRaven-V2-13B
- SGLang
How to use Nexusflow/NexusRaven-V2-13B 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 "Nexusflow/NexusRaven-V2-13B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nexusflow/NexusRaven-V2-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Nexusflow/NexusRaven-V2-13B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Nexusflow/NexusRaven-V2-13B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Nexusflow/NexusRaven-V2-13B with Docker Model Runner:
docker model run hf.co/Nexusflow/NexusRaven-V2-13B
handle the case of a prompt with no function to call.
Hello.
I would like to thank you for the great effort you have done to deliver this master piece of model.
I have done many experiments with it, and it perform really well.
But when I pass a prompt with no associated function to call such as "what time is it" and I don't have a function to get the time, it tries to return always a function call from the list of available functions, instead of saying "no function to call".
Thank you once agian.
Hi mghafiri,
Thank you so much for your interest in the model! One approach for this is to add a "noop"or "irrelevant" function in the list of functions with the docstring describing the function is to be called when no other functions are relevant or are useful to answer the user query. Some variation of that approach might work well.
Thank you again for your interest!
Hello, I tried that solution to handle no function call but model calls random input for example noob_function("hello") or noob_function(null=null).
At the function definition I just added noob_function(*args, **kwargs) to accept all possible function parameters, it works way better.
I just want to share it. BTW perfect work, such a great result, one of the best models on HuggingFace in my opinion!
Thank you so much for the feedback, Ismail! I will update the README for the model with this tip!
I used this model in this little contribution:





OpenMindedChatbot
A chatbot with service calling capabilities and Open Mind Mode :)
https://github.com/mourad-ghafiri/OpenMindedChatbot