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_config.py from Frankenstein-Labs/cortex.6.sol: direct link, hf CLI and curl.
- Browser
- Download file 2.28 kB
-
https://huggingface.co/Frankenstein-Labs/cortex.6.sol/resolve/main/tests/test_config.py
- Command line
-
hf download hf://Frankenstein-Labs/cortex.6.sol/tests/test_config.py
-
curl -L -o test_config.py https://huggingface.co/Frankenstein-Labs/cortex.6.sol/resolve/main/tests/test_config.py
2.28 kB
| """Tests for configuration loading and validation.""" | |
| import json | |
| import pytest | |
| from cortex_ai.config import CortexConfig, EngineConfig, ServerConfig, DEFAULT_MODEL_ID | |
| def test_defaults(): | |
| cfg = CortexConfig() | |
| assert cfg.model_id == DEFAULT_MODEL_ID | |
| assert cfg.engine.thinking_mode == "thinking" | |
| assert cfg.engine.reasoning_effort == "high" | |
| assert cfg.server.requires_auth is False | |
| def test_invalid_thinking_mode_is_rejected(): | |
| with pytest.raises(ValueError, match="thinking_mode"): | |
| EngineConfig(thinking_mode="turbo") | |
| def test_invalid_reasoning_effort_is_rejected(): | |
| with pytest.raises(ValueError, match="reasoning_effort"): | |
| EngineConfig(reasoning_effort="extreme") | |
| def test_invalid_max_tool_rounds_is_rejected(): | |
| with pytest.raises(ValueError, match="max_tool_rounds"): | |
| EngineConfig(max_tool_rounds=0) | |
| def test_round_trip_through_dict(): | |
| cfg = CortexConfig( | |
| model_id="exemple/modele", | |
| engine=EngineConfig(thinking_mode="chat", max_tool_rounds=3), | |
| enabled_tools=["calculate"], | |
| ) | |
| restored = CortexConfig.from_dict(cfg.to_dict()) | |
| assert restored.model_id == "exemple/modele" | |
| assert restored.engine.thinking_mode == "chat" | |
| assert restored.engine.max_tool_rounds == 3 | |
| assert restored.enabled_tools == ["calculate"] | |
| def test_save_and_load_a_file(tmp_path): | |
| path = tmp_path / "cortex.json" | |
| cfg = CortexConfig(model_id="exemple/enregistre") | |
| cfg.save(path) | |
| assert json.loads(path.read_text())["model_id"] == "exemple/enregistre" | |
| assert CortexConfig.load(path).model_id == "exemple/enregistre" | |
| def test_env_overrides(monkeypatch): | |
| monkeypatch.setenv("CORTEX_MODEL_ID", "exemple/depuis-env") | |
| monkeypatch.setenv("CORTEX_PORT", "9001") | |
| monkeypatch.setenv("CORTEX_THINKING_MODE", "chat") | |
| monkeypatch.setenv("CORTEX_TOOLS", "calculate, text_stats") | |
| cfg = CortexConfig.from_env() | |
| assert cfg.model_id == "exemple/depuis-env" | |
| assert cfg.server.port == 9001 | |
| assert cfg.engine.thinking_mode == "chat" | |
| assert cfg.enabled_tools == ["calculate", "text_stats"] | |
| def test_api_key_makes_auth_required(): | |
| assert ServerConfig(api_key="abc").requires_auth is True | |
| assert ServerConfig(api_key="").requires_auth is False | |