Text Generation
Transformers
Safetensors
textgeneratorc2k
feature-extraction
storygeneratorc2k
userneeds2k
gemma-4
latent-variable-models
text-classification
multilingual
bfloat16
custom_code
Instructions to use bbin2022/textgeneratorc2k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bbin2022/textgeneratorc2k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bbin2022/textgeneratorc2k", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bbin2022/textgeneratorc2k", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bbin2022/textgeneratorc2k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bbin2022/textgeneratorc2k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bbin2022/textgeneratorc2k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bbin2022/textgeneratorc2k
- SGLang
How to use bbin2022/textgeneratorc2k 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 "bbin2022/textgeneratorc2k" \ --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": "bbin2022/textgeneratorc2k", "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 "bbin2022/textgeneratorc2k" \ --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": "bbin2022/textgeneratorc2k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bbin2022/textgeneratorc2k with Docker Model Runner:
docker model run hf.co/bbin2022/textgeneratorc2k
File size: 4,141 Bytes
b636a03 | 1 | {"architectures":["TextGeneratorC2KForCausalLM"],"model_type":"textgeneratorc2k","dtype":"bfloat16","torch_dtype":"bfloat16","auto_map":{"AutoConfig":"modeling_textgeneratorc2k.TextGeneratorC2KConfig","AutoModel":"modeling_textgeneratorc2k.TextGeneratorC2KForCausalLM","AutoModelForCausalLM":"modeling_textgeneratorc2k.TextGeneratorC2KForCausalLM"},"custom_pipelines":{"text-generation":{"impl":"modeling_textgeneratorc2k.TextGeneratorC2KPipeline","pt":["AutoModelForCausalLM"],"tf":[]}},"num_categories":2000,"num_topics":5,"num_levels":3,"subspace_dim":256,"classifier_input_dim":768,"classifier_hidden_dim":2048,"embedding_dense_dim":3072,"valid_vocab_len":50780,"runtime_meta_zlib_len":999708,"text_config":{"attention_bias":false,"attention_dropout":0.0,"attention_k_eq_v":true,"bos_token_id":2,"dtype":"bfloat16","enable_moe_block":false,"eos_token_id":1,"expert_intermediate_size":null,"final_logit_softcapping":30.0,"global_head_dim":512,"head_dim":256,"hidden_activation":"gelu_pytorch_tanh","hidden_size":5376,"hidden_size_per_layer_input":0,"initializer_range":0.02,"intermediate_size":21504,"layer_types":["sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention"],"max_position_embeddings":262144,"model_type":"gemma4_text","num_attention_heads":32,"num_experts":null,"num_global_key_value_heads":4,"num_hidden_layers":58,"num_key_value_heads":16,"num_kv_shared_layers":0,"pad_token_id":0,"rms_norm_eps":1e-06,"rope_parameters":{"full_attention":{"partial_rotary_factor":0.25,"rope_theta":1000000.0,"rope_type":"proportional"},"sliding_attention":{"rope_theta":10000.0,"rope_type":"default"}},"sliding_window":1024,"tie_word_embeddings":true,"top_k_experts":null,"use_bidirectional_attention":"vision","use_cache":true,"use_double_wide_mlp":false,"vocab_size":175359,"vocab_size_per_layer_input":262144},"embedding_config":{"_sliding_window_pattern":6,"architectures":["Gemma3TextModel"],"attention_bias":false,"attention_dropout":0.0,"attn_logit_softcapping":null,"bos_token_id":2,"dtype":"bfloat16","eos_token_id":1,"final_logit_softcapping":null,"head_dim":256,"hidden_activation":"gelu_pytorch_tanh","hidden_size":768,"initializer_range":0.02,"intermediate_size":1152,"layer_types":["sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","sliding_attention","full_attention"],"max_position_embeddings":2048,"model_type":"gemma3_text","num_attention_heads":3,"num_hidden_layers":24,"num_key_value_heads":1,"pad_token_id":0,"query_pre_attn_scalar":256,"rms_norm_eps":1e-06,"rope_local_base_freq":10000.0,"rope_scaling":null,"rope_theta":1000000.0,"sliding_window":512,"transformers_version":"4.57.0.dev0","use_bidirectional_attention":true,"use_cache":true,"vocab_size":175359}} |