Text Generation
Transformers
Safetensors
PyTorch
English
hfp
causal-lm
linear-attention
long-context
recurrent-memory
o1-memory
custom_code
Instructions to use kayrahan35/HFP-O1-Memory-Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kayrahan35/HFP-O1-Memory-Model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kayrahan35/HFP-O1-Memory-Model", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("kayrahan35/HFP-O1-Memory-Model", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kayrahan35/HFP-O1-Memory-Model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kayrahan35/HFP-O1-Memory-Model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kayrahan35/HFP-O1-Memory-Model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kayrahan35/HFP-O1-Memory-Model
- SGLang
How to use kayrahan35/HFP-O1-Memory-Model 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 "kayrahan35/HFP-O1-Memory-Model" \ --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": "kayrahan35/HFP-O1-Memory-Model", "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 "kayrahan35/HFP-O1-Memory-Model" \ --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": "kayrahan35/HFP-O1-Memory-Model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kayrahan35/HFP-O1-Memory-Model with Docker Model Runner:
docker model run hf.co/kayrahan35/HFP-O1-Memory-Model
| { | |
| "ENABLE_COHERENCE": false, | |
| "architectures": [ | |
| "HFPForCausalLM" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_hfp.HFPConfig", | |
| "AutoModelForCausalLM": "modeling_hfp.HFPForCausalLM" | |
| }, | |
| "aux_gate_entropy_weight": 0.0, | |
| "aux_ortho_weight": 0.0, | |
| "bos_token_id": 1, | |
| "bptt_across_chunks": false, | |
| "bulk_dim": 128, | |
| "conv_kernel": 3, | |
| "decay_mode": "exp", | |
| "dpfp_nu": 2, | |
| "dropout_p": 0.1, | |
| "dtype": "float32", | |
| "eos_token_id": 2, | |
| "ffn_type": "entangled", | |
| "hidden_size": 768, | |
| "intermediate_size": 3072, | |
| "key_feature_map": "elu", | |
| "local_window": 64, | |
| "max_position_embeddings": 4096, | |
| "max_short_len": null, | |
| "model_type": "hfp", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pe_scale": 0.3, | |
| "rec_block": 64, | |
| "short_len": 8, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "5.13.0", | |
| "tunnel_decay": 0.8, | |
| "tunnel_depth": 3, | |
| "vocab_size": 50257, | |
| "write_rule": "additive" | |
| } | |