Text Generation
Transformers
TensorBoard
Safetensors
kroha_routed_norm
kroha
looped
custom_code
training-checkpoint
multi-token-prediction
conversational
Eval Results (legacy)
Instructions to use d0rj/Kroha-base-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use d0rj/Kroha-base-dev with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="d0rj/Kroha-base-dev", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("d0rj/Kroha-base-dev", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use d0rj/Kroha-base-dev with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "d0rj/Kroha-base-dev" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "d0rj/Kroha-base-dev", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/d0rj/Kroha-base-dev
- SGLang
How to use d0rj/Kroha-base-dev 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 "d0rj/Kroha-base-dev" \ --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": "d0rj/Kroha-base-dev", "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 "d0rj/Kroha-base-dev" \ --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": "d0rj/Kroha-base-dev", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use d0rj/Kroha-base-dev with Docker Model Runner:
docker model run hf.co/d0rj/Kroha-base-dev
Download config.json from d0rj/Kroha-base-dev: direct link, hf CLI and curl.
- Browser
- Download file 4.15 kB
-
https://huggingface.co/d0rj/Kroha-base-dev/resolve/main/config.json
- Command line
-
hf download hf://d0rj/Kroha-base-dev/config.json
-
curl -L -o config.json https://huggingface.co/d0rj/Kroha-base-dev/resolve/main/config.json
4.15 kB
| { | |
| "architectures": [ | |
| "KrohaRoutedNormForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attention_scalar_gate": true, | |
| "attnres_block_size": 4, | |
| "auto_map": { | |
| "AutoConfig": "configuration_kroha.KrohaRoutedNormConfig", | |
| "AutoModel": "modeling_kroha.KrohaRoutedNormModel", | |
| "AutoModelForCausalLM": "modeling_kroha.KrohaRoutedNormForCausalLM" | |
| }, | |
| "bos_token_id": 1, | |
| "decoder_ablation": "headgate_blockattnres", | |
| "delta_backend": "auto", | |
| "delta_conv_kernel": 4, | |
| "delta_num_query_heads": 8, | |
| "delta_num_value_heads": 2, | |
| "dna_config": { | |
| "FNS": "Not implemented; offsets and DNA ID ranges exposed for future training integration", | |
| "auto_detection": false, | |
| "base_count": 16, | |
| "base_id_start": 69634, | |
| "base_vocabulary_size": 65536, | |
| "begin_id": 65536, | |
| "canonical_alphabet": "ACGT", | |
| "canonical_order": "itertools.product(ACGT, repeat=6), lexicographic", | |
| "chat": "Same text chat template; DNACodec.encode enables tagged DNA/spans and preserves assistant masks", | |
| "decoder": "Native Tokenizers Replace-per-piece then unchanged ByteLevel; no remote/custom decoder", | |
| "encoding_entrypoint": "tiny_llm.dna.DNACodec", | |
| "end_id": 65537, | |
| "fallback": "Each noncanonical six-character block/short tail is encoded character by character; uppercase IUPAC gets DNA symbols; other characters use unchanged raw BPE", | |
| "fallback_alphabet": "ACGTURYSWKMBDHVN", | |
| "future_model_scope": "New vocabulary requires matching embedding/head rows; does not migrate old weights", | |
| "k": 6, | |
| "kmer_count": 4096, | |
| "kmer_id_start": 65538, | |
| "normalization": "identity", | |
| "offsets": "Unicode character offsets and IUPAC-base offsets; gaps/layout have zero bp width", | |
| "raw_text_default": true, | |
| "reserve": "Original 51 reserved IDs remain unchanged and unconsumed", | |
| "version": "b64-dna6-v3", | |
| "vocab_size": 69650 | |
| }, | |
| "dtype": "float32", | |
| "eos_token_id": 2, | |
| "expert_backend": "auto", | |
| "expert_intermediate_size": 352, | |
| "experts_per_token": 2, | |
| "gate_multiplier": 2.0, | |
| "gdn_version": 1, | |
| "head_dim": 64, | |
| "headwise_attention_gate": true, | |
| "hidden_act": "silu", | |
| "hidden_size": 512, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1792, | |
| "latent_size": 256, | |
| "layer_types": [ | |
| "full_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "linear_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "layers_block_type": [ | |
| "attention", | |
| "mamba", | |
| "attention", | |
| "mamba", | |
| "attention", | |
| "mamba", | |
| "attention", | |
| "mamba", | |
| "attention", | |
| "mamba", | |
| "attention", | |
| "mamba", | |
| "attention", | |
| "mamba", | |
| "attention", | |
| "mamba", | |
| "attention", | |
| "attention" | |
| ], | |
| "linear_conv_kernel_dim": 4, | |
| "linear_key_head_dim": 64, | |
| "linear_num_key_heads": 8, | |
| "linear_num_value_heads": 8, | |
| "linear_value_head_dim": 64, | |
| "lora_alpha": 16, | |
| "lora_rank": 16, | |
| "max_position_embeddings": 16384, | |
| "mlp_bias": false, | |
| "mlp_scalar_gate": true, | |
| "model_type": "kroha_routed_norm", | |
| "moe_budget": "total", | |
| "nope_layers": [], | |
| "num_attention_heads": 8, | |
| "num_core_layers": 8, | |
| "num_experts": 8, | |
| "num_hidden_layers": 18, | |
| "num_key_value_heads": 2, | |
| "num_passes": 2, | |
| "packed_attention_backend": "fa4", | |
| "pad_token_id": 0, | |
| "pass2_router": false, | |
| "pretraining_tp": 1, | |
| "qk_norm": true, | |
| "relaxed": true, | |
| "rms_norm_eps": 1e-05, | |
| "rope_parameters": { | |
| "rope_theta": 10000.0, | |
| "rope_type": "default" | |
| }, | |
| "routed_output_norm": true, | |
| "routed_scaling_factor": 1.0, | |
| "router_balance_scope": "global", | |
| "router_bias_speed": 0.001, | |
| "router_optimizer": "adamw", | |
| "router_seq_aux_coef": 0.0001, | |
| "shared_expert_gate": true, | |
| "shared_intermediate_size": 256, | |
| "swiglu_limit": 10.0, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.17.0", | |
| "use_cache": true, | |
| "vocab_size": 69650 | |
| } | |