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
Upload folder using huggingface_hub
Browse files- config.json +35 -0
- generation_config.json +13 -0
- model.safetensors +3 -0
- special_tokens_map.json +6 -0
- tokenizer.json +0 -0
- tokenizer_config.json +13 -0
- vocab.json +0 -0
config.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"CaliLMForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"model_type": "cali",
|
| 6 |
+
"arch_id": "2026",
|
| 7 |
+
"arch_name": "CALI",
|
| 8 |
+
"arch_family": "CALI (Computer Assistant Lightweight Intelligence)",
|
| 9 |
+
"vocab_size": 32000,
|
| 10 |
+
"hidden_dim": 768,
|
| 11 |
+
"num_layers": 11,
|
| 12 |
+
"num_heads": 4,
|
| 13 |
+
"num_kv_heads": 1,
|
| 14 |
+
"head_dim": 192,
|
| 15 |
+
"seq_len": 1024,
|
| 16 |
+
"ffn_multiplier": 3.0,
|
| 17 |
+
"ffn_dim": 2304,
|
| 18 |
+
"dropout": 0.0,
|
| 19 |
+
"rope_theta": 10000.0,
|
| 20 |
+
"attn_type": "Grouped-Query Attention (GQA)",
|
| 21 |
+
"norm_type": "RMSNorm",
|
| 22 |
+
"rms_norm_eps": 1e-06,
|
| 23 |
+
"pos_enc": "RoPE",
|
| 24 |
+
"ffn_type": "Gated Linear Unit",
|
| 25 |
+
"tie_embeddings": true,
|
| 26 |
+
"trained_steps": 33356,
|
| 27 |
+
"trained_tokens": 614817792,
|
| 28 |
+
"param_count": 99206400,
|
| 29 |
+
"bos_token_id": 1,
|
| 30 |
+
"eos_token_id": 2,
|
| 31 |
+
"pad_token_id": 0,
|
| 32 |
+
"max_position_embeddings": 1024,
|
| 33 |
+
"torch_dtype": "float32",
|
| 34 |
+
"transformers_version": "4.40.0"
|
| 35 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 2,
|
| 3 |
+
"eos_token_id": 3,
|
| 4 |
+
"pad_token_id": 0,
|
| 5 |
+
"do_sample": true,
|
| 6 |
+
"temperature": 0.7,
|
| 7 |
+
"top_k": 40,
|
| 8 |
+
"top_p": 0.9,
|
| 9 |
+
"repetition_penalty": 1.0,
|
| 10 |
+
"max_new_tokens": 200,
|
| 11 |
+
"min_new_tokens": 1,
|
| 12 |
+
"transformers_version": "4.40.0"
|
| 13 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:93330caa8ee188ca16c77ba4c1d3f98608f7fb0f1bece948b82813e27c6bff27
|
| 3 |
+
size 396835632
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<bos>",
|
| 3 |
+
"eos_token": "<eos>",
|
| 4 |
+
"unk_token": "<unk>",
|
| 5 |
+
"pad_token": "<pad>"
|
| 6 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<bos>",
|
| 3 |
+
"eos_token": "<eos>",
|
| 4 |
+
"unk_token": "<unk>",
|
| 5 |
+
"pad_token": "<pad>",
|
| 6 |
+
"model_max_length": 1024,
|
| 7 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 8 |
+
"add_bos_token": true,
|
| 9 |
+
"add_eos_token": false,
|
| 10 |
+
"use_default_system_prompt": false,
|
| 11 |
+
"chat_template": null,
|
| 12 |
+
"clean_up_tokenization_spaces": false
|
| 13 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|