Instructions to use CyberNative/CyberBase-13b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CyberNative/CyberBase-13b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CyberNative/CyberBase-13b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CyberNative/CyberBase-13b") model = AutoModelForCausalLM.from_pretrained("CyberNative/CyberBase-13b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use CyberNative/CyberBase-13b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CyberNative/CyberBase-13b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CyberNative/CyberBase-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CyberNative/CyberBase-13b
- SGLang
How to use CyberNative/CyberBase-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 "CyberNative/CyberBase-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": "CyberNative/CyberBase-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 "CyberNative/CyberBase-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": "CyberNative/CyberBase-13b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CyberNative/CyberBase-13b with Docker Model Runner:
docker model run hf.co/CyberNative/CyberBase-13b
| license: llama2 | |
| base_model: | |
| - lmsys/vicuna-13b-v1.5-16k | |
| <img src="https://huggingface.co/CyberNative/CyberBase/resolve/main/image.png" alt="CyberNative/CyberBase"/> | |
| ## Check out our new Colibri model! | |
| > [CyberNative-AI/Colibri_8b_v0.1](https://huggingface.co/CyberNative-AI/Colibri_8b_v0.1) | |
| CyberBase is an experimental *base model* for cybersecurity. (llama-2-13b -> lmsys/vicuna-13b-v1.5-16k -> CyberBase) | |
| # Base cybersecurity model for future fine-tuning, it is not recomended to use on it's own. | |
| - **CyberBase** is a [lmsys/vicuna-13b-v1.5-16k](https://huggingface.co/lmsys/vicuna-13b-v1.5-16k) QLORA fine-tuned on [CyberNative/github_cybersecurity_READMEs](https://huggingface.co/datasets/CyberNative/github_cybersecurity_READMEs) with a single 3090. | |
| - It might, therefore, inherited [prompt template of FastChat](https://github.com/lm-sys/FastChat/blob/main/docs/vicuna_weights_version.md#prompt-template) | |
| ## Fine-tuning information | |
| - **sequence_len:** 4096 (used during fine-tuning, but should generate up to 16k) | |
| - **lora_r:** 256 | |
| - **lora_alpha:** 128 | |
| - **num_epochs:** 3 | |
| - **gradient_accumulation_steps:** 2 | |
| - **micro_batch_size:** 1 | |
| - **flash_attention:** true (FlashAttention-2) | |
| - trainable params: 1,001,390,080 || all params: 14,017,264,640 || trainable%: 7.143976415643959 | |
| ### Tested with the following prompt and temperature=0.3: | |
| <code>A chat between a cyber security red team lead (USER) and a general cyber security artificial intelligence assistant (ASSISTANT). The assistant knows everything about cyber security. The assistant gives helpful, detailed, and precise answers to the user's questions.<br> | |
| <br> | |
| USER: Hello! I need help with a penetration test.<br> | |
| ASSISTANT: Hello! I'd be happy to help you with your penetration test. What specifically do you need help with?<br> | |
| USER: Write me a plan for a penetration test. It should include first 5 steps and commands for each step.<br> | |
| ASSISTANT:<br></code> | |
| Join the discussion > https://cybernative.ai/t/cyberbase-devlog/1734 | |
| [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl) | |
| # ANY ILLEGAL AND/OR UNETHICAL USE IS NOT PERMITTED! | |
| --- | |
| inference: false | |
| license: llama2 | |
| --- | |
| # Vicuna Model Card | |
| ## Model Details | |
| Vicuna is a chat assistant trained by fine-tuning Llama 2 on user-shared conversations collected from ShareGPT. | |
| - **Developed by:** [LMSYS](https://lmsys.org/) | |
| - **Model type:** An auto-regressive language model based on the transformer architecture | |
| - **License:** Llama 2 Community License Agreement | |
| - **Finetuned from model:** [Llama 2](https://arxiv.org/abs/2307.09288) | |
| ### Model Sources | |
| - **Repository:** https://github.com/lm-sys/FastChat | |
| - **Blog:** https://lmsys.org/blog/2023-03-30-vicuna/ | |
| - **Paper:** https://arxiv.org/abs/2306.05685 | |
| - **Demo:** https://chat.lmsys.org/ | |
| ## Uses | |
| The primary use of Vicuna is research on large language models and chatbots. | |
| The primary intended users of the model are researchers and hobbyists in natural language processing, machine learning, and artificial intelligence. | |
| ## How to Get Started with the Model | |
| - Command line interface: https://github.com/lm-sys/FastChat#vicuna-weights | |
| - APIs (OpenAI API, Huggingface API): https://github.com/lm-sys/FastChat/tree/main#api | |
| ## Training Details | |
| Vicuna v1.5 (16k) is fine-tuned from Llama 2 with supervised instruction fine-tuning and linear RoPE scaling. | |
| The training data is around 125K conversations collected from ShareGPT.com. These conversations are packed into sequences that contain 16K tokens each. | |
| See more details in the "Training Details of Vicuna Models" section in the appendix of this [paper](https://arxiv.org/pdf/2306.05685.pdf). | |
| ## Evaluation | |
|  | |
| Vicuna is evaluated with standard benchmarks, human preference, and LLM-as-a-judge. See more details in this [paper](https://arxiv.org/pdf/2306.05685.pdf) and [leaderboard](https://huggingface.co/spaces/lmsys/chatbot-arena-leaderboard). | |
| ## Difference between different versions of Vicuna | |
| See [vicuna_weights_version.md](https://github.com/lm-sys/FastChat/blob/main/docs/vicuna_weights_version.md) |