Text Generation
Transformers
Safetensors
French
English
Chinese
deepseek_v4
cortex
code-generation
web-development
software-engineering
Mixture of Experts
8-bit precision
fp8
Instructions to use Frankenstein-Labs/cortex.6.sol with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Frankenstein-Labs/cortex.6.sol with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Frankenstein-Labs/cortex.6.sol")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Frankenstein-Labs/cortex.6.sol") model = AutoModelForCausalLM.from_pretrained("Frankenstein-Labs/cortex.6.sol", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Frankenstein-Labs/cortex.6.sol with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Frankenstein-Labs/cortex.6.sol" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Frankenstein-Labs/cortex.6.sol", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Frankenstein-Labs/cortex.6.sol
- SGLang
How to use Frankenstein-Labs/cortex.6.sol 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 "Frankenstein-Labs/cortex.6.sol" \ --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": "Frankenstein-Labs/cortex.6.sol", "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 "Frankenstein-Labs/cortex.6.sol" \ --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": "Frankenstein-Labs/cortex.6.sol", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Frankenstein-Labs/cortex.6.sol with Docker Model Runner:
docker model run hf.co/Frankenstein-Labs/cortex.6.sol
Download tests/test_cortex_architecture.py from Frankenstein-Labs/cortex.6.sol: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/Frankenstein-Labs/cortex.6.sol/resolve/main/tests/test_cortex_architecture.py
- Command line
-
hf download hf://Frankenstein-Labs/cortex.6.sol/tests/test_cortex_architecture.py
-
curl -L -o test_cortex_architecture.py https://huggingface.co/Frankenstein-Labs/cortex.6.sol/resolve/main/tests/test_cortex_architecture.py
1.22 kB
| import torch | |
| from torch import nn | |
| from cortex_ai.identity import ( | |
| IDENTITY_STATEMENT, | |
| IDENTITY_STATEMENT_EN, | |
| identity_response, | |
| is_identity_question, | |
| ) | |
| from cortex_ai.vision import PrefixFusion, VisionConfig, build_vision_adapter | |
| def test_identity_questions_and_canonical_responses(): | |
| assert is_identity_question("Qui t'a créé ?") | |
| assert is_identity_question("Who is your creator?") | |
| assert identity_response("fr") == IDENTITY_STATEMENT | |
| assert identity_response("en") == IDENTITY_STATEMENT_EN | |
| def test_image_encoder_projector_and_fusion_path(): | |
| class DummyEncoder(nn.Module): | |
| def forward(self, images): | |
| batch = images.shape[0] | |
| return torch.ones(batch, 2, 4) | |
| config = VisionConfig(vision_hidden_size=4, cortex_hidden_size=8) | |
| adapter = build_vision_adapter(config, DummyEncoder()) | |
| multimodal = adapter.prepare_multimodal_input(torch.zeros(2, 3, 16, 16)) | |
| assert multimodal.image_embeddings.shape == (2, 2, 8) | |
| text = torch.zeros(2, 3, 8) | |
| fused = PrefixFusion().fuse(text, multimodal.image_embeddings) | |
| assert fused.shape == (2, 5, 8) | |
| assert multimodal.metadata["vision_status"] == "experimental / in development" | |