Text Generation
Transformers
Safetensors
English
mistral
conversational-ai
chatbot
emotional-intelligence
friend
text-generation-inference
Instructions to use CaptMetal/BuddAi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CaptMetal/BuddAi with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CaptMetal/BuddAi")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CaptMetal/BuddAi") model = AutoModelForCausalLM.from_pretrained("CaptMetal/BuddAi", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CaptMetal/BuddAi with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CaptMetal/BuddAi" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CaptMetal/BuddAi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CaptMetal/BuddAi
- SGLang
How to use CaptMetal/BuddAi 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 "CaptMetal/BuddAi" \ --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": "CaptMetal/BuddAi", "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 "CaptMetal/BuddAi" \ --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": "CaptMetal/BuddAi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CaptMetal/BuddAi with Docker Model Runner:
docker model run hf.co/CaptMetal/BuddAi
Update config.json
Browse files- config.json +10 -7
config.json
CHANGED
|
@@ -1,17 +1,20 @@
|
|
| 1 |
{
|
| 2 |
-
"model_type": "mistral",
|
| 3 |
-
"architectures": ["MistralForCausalLM"],
|
| 4 |
"vocab_size": 32000,
|
| 5 |
"hidden_size": 4096,
|
| 6 |
"num_hidden_layers": 32,
|
| 7 |
"num_attention_heads": 32,
|
| 8 |
-
"num_key_value_heads": 8,
|
| 9 |
-
"intermediate_size": 14336,
|
| 10 |
-
"max_position_embeddings": 32768,
|
| 11 |
"rms_norm_eps": 1e-5,
|
| 12 |
-
"rope_theta":
|
| 13 |
"torch_dtype": "bfloat16",
|
| 14 |
"attention_dropout": 0.0,
|
| 15 |
"hidden_act": "silu",
|
| 16 |
-
"sliding_window": 4096
|
|
|
|
|
|
|
|
|
|
| 17 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"model_type": "mistral",
|
| 3 |
+
"architectures": ["MistralForCausalLM"],
|
| 4 |
"vocab_size": 32000,
|
| 5 |
"hidden_size": 4096,
|
| 6 |
"num_hidden_layers": 32,
|
| 7 |
"num_attention_heads": 32,
|
| 8 |
+
"num_key_value_heads": 8,
|
| 9 |
+
"intermediate_size": 14336,
|
| 10 |
+
"max_position_embeddings": 32768,
|
| 11 |
"rms_norm_eps": 1e-5,
|
| 12 |
+
"rope_theta": 1000000.0, // OpenHermes uses Llama-2's rope_theta
|
| 13 |
"torch_dtype": "bfloat16",
|
| 14 |
"attention_dropout": 0.0,
|
| 15 |
"hidden_act": "silu",
|
| 16 |
+
"sliding_window": 4096,
|
| 17 |
+
"bos_token_id": 1, // <s>
|
| 18 |
+
"eos_token_id": 2, // </s>
|
| 19 |
+
"pad_token_id": 32000 // Added for safety
|
| 20 |
}
|