Text Generation
Transformers
Safetensors
PyTorch
English
logos
causal-lm
custom-code
base-model
custom_code
Instructions to use Rorical/logos-1b-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Rorical/logos-1b-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Rorical/logos-1b-base", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Rorical/logos-1b-base", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Rorical/logos-1b-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Rorical/logos-1b-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Rorical/logos-1b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Rorical/logos-1b-base
- SGLang
How to use Rorical/logos-1b-base 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 "Rorical/logos-1b-base" \ --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": "Rorical/logos-1b-base", "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 "Rorical/logos-1b-base" \ --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": "Rorical/logos-1b-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Rorical/logos-1b-base with Docker Model Runner:
docker model run hf.co/Rorical/logos-1b-base
| { | |
| "A_init_range": [ | |
| 1, | |
| 16 | |
| ], | |
| "architectures": [ | |
| "LogosForCausalLM" | |
| ], | |
| "attention_sink": true, | |
| "attn_pattern": null, | |
| "auto_map": { | |
| "AutoConfig": "configuration_logos.LogosConfig", | |
| "AutoModelForCausalLM": "modeling_logos.LogosForCausalLM", | |
| "AutoTokenizer": "tokenization_logos.LogosTokenizer" | |
| }, | |
| "bias_update_rate": 0.02, | |
| "block_residual_isolate_softmax": false, | |
| "body_attn_pattern": "hca,csa,kda,swa,csa,kda,csa,hca,kda,swa,csa,kda,csa,csa,kda,swa,hca,kda", | |
| "bos_token_id": 100257, | |
| "capacity_factor": 2.0, | |
| "chunk_size": 128, | |
| "ckpt_granularity": "per-block", | |
| "compressed_head_dim": null, | |
| "compressed_query_dim": null, | |
| "compressed_rope": false, | |
| "conv_size": 4, | |
| "csa_compression": 4, | |
| "csa_indexer_dim": 32, | |
| "csa_indexer_heads": 4, | |
| "csa_indexer_loss_weight": 1.0, | |
| "csa_top_k": 64, | |
| "d_ff": 2730, | |
| "d_model": 1024, | |
| "dtype": "bfloat16", | |
| "entry_attn_pattern": "hca,kda", | |
| "entry_top_k": 12, | |
| "eos_token_id": 100257, | |
| "exit_attn_pattern": "csa,swa", | |
| "exit_top_k": 12, | |
| "expand": 2, | |
| "expert_d_ff": 832, | |
| "gradient_checkpointing": true, | |
| "hca_compression": 128, | |
| "head_dim": 64, | |
| "indexer_rope": false, | |
| "lm_head_chunk_size": 4096, | |
| "max_seq_len": 4096, | |
| "model_max_length": 4096, | |
| "model_type": "logos", | |
| "moe_aux_loss_decay_steps": 8000, | |
| "moe_aux_loss_weight": 0.001, | |
| "moe_diversity_factor": 0.0, | |
| "norm_eps": 1e-06, | |
| "num_body_layers": 6, | |
| "num_entry_layers": 2, | |
| "num_exit_layers": 2, | |
| "num_heads": 16, | |
| "num_layers": 10, | |
| "num_loops": 3, | |
| "num_shared_experts": 2, | |
| "num_sparse_experts": 32, | |
| "pad_token_id": 100257, | |
| "partial_rope_dim": null, | |
| "qk_norm": true, | |
| "rope_base": 10000.0, | |
| "router_bias_clip": 1.0, | |
| "router_bias_error_clip": 1.0, | |
| "router_init_std": 0.002, | |
| "router_logit_noise_decay_steps": 8000, | |
| "router_logit_noise_std": 0.08, | |
| "swa_every": 4, | |
| "swa_offset": 3, | |
| "swa_window": 256, | |
| "tie_word_embeddings": true, | |
| "tokenizer_encoding": "cl100k_base", | |
| "top_k": 6, | |
| "transformers_version": "5.5.4", | |
| "use_moe": true, | |
| "vocab_size": 100277 | |
| } | |