Instructions to use MemTensor/MemT-1.0-Pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MemTensor/MemT-1.0-Pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MemTensor/MemT-1.0-Pro", 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("MemTensor/MemT-1.0-Pro", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MemTensor/MemT-1.0-Pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MemTensor/MemT-1.0-Pro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MemTensor/MemT-1.0-Pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MemTensor/MemT-1.0-Pro
- SGLang
How to use MemTensor/MemT-1.0-Pro 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 "MemTensor/MemT-1.0-Pro" \ --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": "MemTensor/MemT-1.0-Pro", "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 "MemTensor/MemT-1.0-Pro" \ --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": "MemTensor/MemT-1.0-Pro", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MemTensor/MemT-1.0-Pro with Docker Model Runner:
docker model run hf.co/MemTensor/MemT-1.0-Pro
Download config.json from MemTensor/MemT-1.0-Pro: direct link, hf CLI and curl.
- Browser
- Download file 4.63 kB
-
https://huggingface.co/MemTensor/MemT-1.0-Pro/resolve/main/config.json
- Command line
-
hf download hf://MemTensor/MemT-1.0-Pro/config.json
-
curl -L -o config.json https://huggingface.co/MemTensor/MemT-1.0-Pro/resolve/main/config.json
4.63 kB
| { | |
| "model_type": "memt_nemotron_h", | |
| "architectures": [ | |
| "MemTNemotronHForCausalLM" | |
| ], | |
| "dtype": "bfloat16", | |
| "tie_word_embeddings": false, | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "pad_token_id": 0, | |
| "use_cache": true, | |
| "backbone_configs": { | |
| "architectures": [ | |
| "NemotronHForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 1, | |
| "chunk_size": 128, | |
| "conv_kernel": 4, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 2, | |
| "expand": 2, | |
| "head_dim": 128, | |
| "hidden_dropout": 0.0, | |
| "hidden_size": 8192, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 5120, | |
| "layer_norm_epsilon": 1e-05, | |
| "layers_block_type": [ | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "attention", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe", | |
| "mamba", | |
| "moe" | |
| ], | |
| "mamba_head_dim": 64, | |
| "mamba_hidden_act": "silu", | |
| "mamba_num_heads": 256, | |
| "mamba_proj_bias": false, | |
| "mamba_ssm_cache_dtype": "float32", | |
| "max_position_embeddings": 262144, | |
| "mlp_bias": false, | |
| "mlp_hidden_act": "relu2", | |
| "model_type": "nemotron_h", | |
| "moe_intermediate_size": 5120, | |
| "moe_latent_size": 2048, | |
| "moe_shared_expert_intermediate_size": 10240, | |
| "moe_shared_expert_overlap": false, | |
| "mtp_layers_block_type": [ | |
| "attention", | |
| "moe" | |
| ], | |
| "n_group": 1, | |
| "n_groups": 8, | |
| "n_routed_experts": 512, | |
| "n_shared_experts": 1, | |
| "norm_eps": 1e-05, | |
| "norm_topk_prob": true, | |
| "num_attention_heads": 64, | |
| "num_experts_per_tok": 22, | |
| "num_key_value_heads": 2, | |
| "num_logits_to_keep": 1, | |
| "num_nextn_predict_layers": 1, | |
| "pad_token_id": 0, | |
| "partial_rotary_factor": 1.0, | |
| "rescale_prenorm_residual": true, | |
| "residual_in_fp32": false, | |
| "rope_theta": 10000, | |
| "routed_scaling_factor": 5.0, | |
| "sliding_window": null, | |
| "ssm_state_size": 128, | |
| "tie_word_embeddings": false, | |
| "time_step_floor": 0.0001, | |
| "time_step_max": 0.1, | |
| "time_step_min": 0.001, | |
| "topk_group": 1, | |
| "transformers_version": "4.57.6", | |
| "use_bias": false, | |
| "use_cache": true, | |
| "use_conv_bias": true, | |
| "use_mamba_kernels": true, | |
| "vocab_size": 131072 | |
| }, | |
| "memt": { | |
| "chunk_tokens": 2048, | |
| "gate_latent_norm": false, | |
| "gate_rank": 512, | |
| "gdn_version": "stable_gdn2", | |
| "head_dim": 128, | |
| "layers": [ | |
| 7, | |
| 14, | |
| 23, | |
| 32, | |
| 39, | |
| 48, | |
| 57, | |
| 64, | |
| 73, | |
| 82, | |
| 89, | |
| 98 | |
| ], | |
| "linear_attention_state_policy": "reset_per_chunk", | |
| "memory_head_mode": "mha", | |
| "memory_read_scale": "k_inv_sqrt", | |
| "memory_update_mode": "token", | |
| "memory_use_short_conv": false, | |
| "norm_eps": 1e-05, | |
| "num_kv_heads": 64, | |
| "num_memory_heads": 64, | |
| "output_gate_bias": false, | |
| "output_gate_softcap_enabled": true, | |
| "output_gate_softcap_limit": 2.0, | |
| "output_gate_type": "silu", | |
| "projection": "dense_v1", | |
| "stable_gdn2_sqrt_erase_gate": true, | |
| "tail_policy": "commit" | |
| }, | |
| "auto_map": { | |
| "AutoConfig": "configuration_memt.MemTNemotronHConfig", | |
| "AutoModelForCausalLM": "modeling_memt.MemTNemotronHForCausalLM" | |
| }, | |
| "transformers_version": "5.12.1" | |
| } | |