Instructions to use scrallex/structural-manifold-compression with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use scrallex/structural-manifold-compression with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="scrallex/structural-manifold-compression")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("scrallex/structural-manifold-compression") model = AutoModelForCausalLM.from_pretrained("scrallex/structural-manifold-compression", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use scrallex/structural-manifold-compression with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "scrallex/structural-manifold-compression" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "scrallex/structural-manifold-compression", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/scrallex/structural-manifold-compression
- SGLang
How to use scrallex/structural-manifold-compression 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 "scrallex/structural-manifold-compression" \ --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": "scrallex/structural-manifold-compression", "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 "scrallex/structural-manifold-compression" \ --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": "scrallex/structural-manifold-compression", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use scrallex/structural-manifold-compression with Docker Model Runner:
docker model run hf.co/scrallex/structural-manifold-compression
File size: 535 Bytes
1a223ca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | {
"manifold_eval": {
"samples_evaluated": 941,
"tokens_evaluated": 480851,
"average_loss": 6.597424141278809,
"perplexity": 733.2041244912825,
"dataset_sequences": 3766,
"dataset_tokens_total": 1923930
},
"gpt2_eval": {
"documents": 10000,
"tokens_used_for_loss": 636017,
"raw_tokens_total": 642537,
"block_size": 1024,
"average_loss": 9.249136895236393,
"perplexity": 10395.589360652519
},
"compression_proxy": {
"raw_tokens_over_manifold_tokens": 1.3362496906526138
}
} |