Instructions to use NousResearch/Nous-Capybara-7B-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NousResearch/Nous-Capybara-7B-V1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NousResearch/Nous-Capybara-7B-V1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NousResearch/Nous-Capybara-7B-V1") model = AutoModelForCausalLM.from_pretrained("NousResearch/Nous-Capybara-7B-V1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NousResearch/Nous-Capybara-7B-V1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NousResearch/Nous-Capybara-7B-V1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NousResearch/Nous-Capybara-7B-V1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NousResearch/Nous-Capybara-7B-V1
- SGLang
How to use NousResearch/Nous-Capybara-7B-V1 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 "NousResearch/Nous-Capybara-7B-V1" \ --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": "NousResearch/Nous-Capybara-7B-V1", "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 "NousResearch/Nous-Capybara-7B-V1" \ --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": "NousResearch/Nous-Capybara-7B-V1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NousResearch/Nous-Capybara-7B-V1 with Docker Model Runner:
docker model run hf.co/NousResearch/Nous-Capybara-7B-V1
language:
- eng
tags:
- llama-2
- sft
license:
- mit
datasets:
- LDJnr/Puffin
Nous-Capybara-7B
A model created with the goal of a synergistic combination of different techniques used for SOTA models such as Evol-Instruct, Orca, Vicuna, Lamini, FLASK and others, all into one lean holistically formed dataset and model. The seed instructions used for the start of synthesized conversations are largely based on highly acclaimed datasets like Airoboros, Know logic, EverythingLM, GPTeacher and even entirely new seed instructions derived from posts and discussions made on the website LessWrong, as well as being supplemented with certain multi-turn datasets like Dove(A successor to Puffin).
Entirely contained within 20K training examples, mostly comprised of newly synthesized tokens never used for model training until now!
Process of creation and special thank yous!
This model was fine-tuned by Nous Research, with LDJ leading the training and dataset curation, along with significant dataset formation contributions by J-Supha, Also thank you to Emozilla for also assisting to expedite the training experimentation process.
Special thank you to A16Z for sponsoring our training, as well as Yield Protocol for their support in resources during R&D of aspects outside of training, such as dataset development/synthesis.
Thank you to dataset creators!
While most of the tokens within Capybara are newly synthsized and part of datasets like Puffin/Dove, we would like to credit the single-turn datasets we leveraged as seeds that are used to initiate the beggining of many of the multi-turn conversations:
Model Training
Nous-Capybara 7B is a new model trained for multiple epochs on a dataset of less than 20,000 carefully curated GPT-4 examples, most of which are long context conversations between a real human and GPT-4 comprised of entirely newly synthesized tokens that previously didn't exist on HuggingFace.
Additional data came from manually curated CamelAI data, with the help of volunteers ranging from former Physicists, Mathematicians, Biologists and more!
Specific credits to the people involved in validating this data will be posted soon :)
Prompt Format
The reccomended model usage is:
USER:
ASSISTANT:
When should I use Capybara or Hermes 2?
Hermes 2 is trained on purely single turn instruction examples.
Capybara is trained mostly on multi-turn, long context, highly curated and cleaned GPT-4 conversations with real humans.
For these reasons, it's reccomended to give Capybara a try if you want to have multi-turn conversations and/or long context communication.
Example Outputs!:
Coming soon!
Notable Features:
The first Nous model trained on over 15,000 multi-turn conversations.
Over 1,000 tokens average per conversation example during training!
Able to effectively do complex summary of advanced studies on topics.
Ability to recall information upto 2023 without internet (ChatGPT cut off date is in 2021)
Context length of 4096 tokens, and fine-tuned on a significant amount of multi-turn conversations reaching that full token limit.
Includes a portion of conversational data synthesized from less wrong posts, speaking in-depth about the nature of rationality, reasoning and self-improvement.
Limitations
We noticed that the current version of Capybara still has some issues in some situations with censoring itself and not acting as expected in certain edge cases, we plan to have this largely resolved in the near future with Capybara 1.1
Future Changes
This is a relatively early build amongst the grand plans for the future of Capybara!
Current limitations: We are still running experimentation and tests for the training pipeline and dataset cleaning process to be more refined, we plan to release a Capybara 1.1 with these improvements.
Future model sizes
We plan on releasing a 3B, 13B and 70B version, as well as a potential 1B version based on phi-1.5 or similar architectures.
How you can help!
In the near future we plan on leveraging the help of domain specific expert volunteers to eliminate any mathematically/verifiably incorrect answers from our training curations.
If you have at-least a bachelors in mathematics, physics, biology or chemistry and would like to volunteer even just 30 minutes of your expertise time, please contact LDJ on discord!
Dataset contamination.
We checked for 100%, 99%, 98% and 97% similarity matches between our data and many popular benchmarks, we found no exact matches!
The following are benchmarks we checked for contamination for:
HumanEval
AGIEval
TruthfulQA
MMLU
GPT4All
