Text Generation
Transformers
Safetensors
PyTorch
Indonesian
English
cali
causal-lm
transformer
indonesian
english
custom-architecture
conversational
custom_code
Instructions to use Sandroeth/cali-0.1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sandroeth/cali-0.1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sandroeth/cali-0.1B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Sandroeth/cali-0.1B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Sandroeth/cali-0.1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sandroeth/cali-0.1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sandroeth/cali-0.1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Sandroeth/cali-0.1B
- SGLang
How to use Sandroeth/cali-0.1B 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 "Sandroeth/cali-0.1B" \ --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": "Sandroeth/cali-0.1B", "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 "Sandroeth/cali-0.1B" \ --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": "Sandroeth/cali-0.1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Sandroeth/cali-0.1B with Docker Model Runner:
docker model run hf.co/Sandroeth/cali-0.1B
Update config.json
Browse files- config.json +6 -4
config.json
CHANGED
|
@@ -1,8 +1,6 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"model_type": "cali",
|
| 3 |
-
"architectures": [
|
| 4 |
-
"CaliForCausalLM"
|
| 5 |
-
],
|
| 6 |
"auto_map": {
|
| 7 |
"AutoConfig": "configuration_cali.CaliConfig",
|
| 8 |
"AutoModelForCausalLM": "modeling_cali.CaliForCausalLM"
|
|
@@ -13,6 +11,10 @@
|
|
| 13 |
"num_heads": 4,
|
| 14 |
"num_kv_heads": 1,
|
| 15 |
"head_dim": 192,
|
|
|
|
| 16 |
"ffn_multiplier": 3.0,
|
| 17 |
-
"tie_embeddings": true
|
|
|
|
|
|
|
|
|
|
| 18 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"architectures": ["CaliForCausalLM"],
|
| 3 |
"model_type": "cali",
|
|
|
|
|
|
|
|
|
|
| 4 |
"auto_map": {
|
| 5 |
"AutoConfig": "configuration_cali.CaliConfig",
|
| 6 |
"AutoModelForCausalLM": "modeling_cali.CaliForCausalLM"
|
|
|
|
| 11 |
"num_heads": 4,
|
| 12 |
"num_kv_heads": 1,
|
| 13 |
"head_dim": 192,
|
| 14 |
+
"seq_len": 1024,
|
| 15 |
"ffn_multiplier": 3.0,
|
| 16 |
+
"tie_embeddings": true,
|
| 17 |
+
"rope_theta": 10000.0,
|
| 18 |
+
"torch_dtype": "float16",
|
| 19 |
+
"transformers_version": "4.40.0"
|
| 20 |
}
|