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_orchestration.py from Frankenstein-Labs/cortex.6.sol: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/Frankenstein-Labs/cortex.6.sol/resolve/main/tests/test_orchestration.py
- Command line
-
hf download hf://Frankenstein-Labs/cortex.6.sol/tests/test_orchestration.py
-
curl -L -o test_orchestration.py https://huggingface.co/Frankenstein-Labs/cortex.6.sol/resolve/main/tests/test_orchestration.py
1.99 kB
| from decimal import Decimal | |
| import time | |
| import pytest | |
| from cortex_ai.orchestration import * | |
| from cortex_ai.orchestration.errors import PolicyDenied | |
| class EchoProvider(Provider): | |
| id = "echo" | |
| capabilities = frozenset({Capability.VISION, Capability.VIDEO_GENERATION}) | |
| local = True | |
| def health(self): return True | |
| def generate(self, request): return ProviderResult({"echo": request["text"]}, self.id, {"test": True}) | |
| def test_router_detects_mixed_request_and_privacy(): | |
| req = CapabilityRouter().route("Analyse cette facture confidentielle et génère une vidéo") | |
| assert Capability.DOCUMENT_ANALYSIS in req.capabilities | |
| assert Capability.VIDEO_GENERATION in req.capabilities | |
| assert req.requires_async_job is True | |
| assert req.requires_async is True | |
| assert req.privacy_mode == PrivacyMode.LOCAL_ONLY | |
| def test_registry_selects_provider_and_engine_returns_job_for_long_task(): | |
| jobs = JobManager() | |
| engine = OrchestrationEngine(CapabilityRouter(), ProviderRegistry([EchoProvider()]), Policy(), jobs) | |
| job = engine.execute("generate a video", preferred_provider="echo") | |
| assert job.provider == "echo" | |
| for _ in range(20): | |
| if jobs.get(job.id).status == JobStatus.COMPLETED: break | |
| time.sleep(0.01) | |
| assert jobs.get(job.id).result.output["echo"] == "generate a video" | |
| jobs.shutdown() | |
| def test_local_only_policy_denies_external_provider(): | |
| class External(EchoProvider): | |
| id = "external"; local = False | |
| with pytest.raises(PolicyDenied): | |
| OrchestrationEngine(CapabilityRouter(), ProviderRegistry([External()]), Policy(PrivacyMode.LOCAL_ONLY), JobManager()).execute("describe this image", preferred_provider="external") | |
| def test_money_is_decimal_and_supports_gnf(): | |
| total = add(Money(Decimal("10.005"), "USD"), Money(Decimal("2.00"), "USD")) | |
| assert total == Money(Decimal("12.01"), "USD") | |
| assert convert(Money(Decimal("100"), "USD"), "GNF", Decimal("8500")).amount == Decimal("850000.00") | |