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 +11 -10
config.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"architectures": ["CaliForCausalLM"],
|
| 3 |
"model_type": "cali",
|
| 4 |
-
|
| 5 |
"auto_map": {
|
| 6 |
-
"AutoConfig": "configuration_cali.
|
| 7 |
-
"AutoModelForCausalLM": "modeling_cali.
|
| 8 |
},
|
| 9 |
"vocab_size": 32000,
|
| 10 |
"hidden_dim": 768,
|
|
@@ -13,14 +12,16 @@
|
|
| 13 |
"num_kv_heads": 1,
|
| 14 |
"head_dim": 192,
|
| 15 |
"seq_len": 1024,
|
| 16 |
-
"max_position_embeddings": 1024,
|
| 17 |
"ffn_multiplier": 3.0,
|
| 18 |
-
"
|
| 19 |
"tie_embeddings": true,
|
| 20 |
"rope_theta": 10000.0,
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
|
|
|
|
|
|
|
|
|
| 25 |
"transformers_version": "4.40.0"
|
| 26 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"model_type": "cali",
|
| 3 |
+
"architectures": ["CALIForCausalLM"],
|
| 4 |
"auto_map": {
|
| 5 |
+
"AutoConfig": "configuration_cali.CALIConfig",
|
| 6 |
+
"AutoModelForCausalLM": "modeling_cali.CALIForCausalLM"
|
| 7 |
},
|
| 8 |
"vocab_size": 32000,
|
| 9 |
"hidden_dim": 768,
|
|
|
|
| 12 |
"num_kv_heads": 1,
|
| 13 |
"head_dim": 192,
|
| 14 |
"seq_len": 1024,
|
|
|
|
| 15 |
"ffn_multiplier": 3.0,
|
| 16 |
+
"dropout": 0.0,
|
| 17 |
"tie_embeddings": true,
|
| 18 |
"rope_theta": 10000.0,
|
| 19 |
+
"rms_norm_eps": 1e-6,
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"use_cache": true,
|
| 22 |
+
"pad_token_id": null,
|
| 23 |
+
"bos_token_id": 1,
|
| 24 |
+
"eos_token_id": 2,
|
| 25 |
+
"torch_dtype": "float32",
|
| 26 |
"transformers_version": "4.40.0"
|
| 27 |
}
|