Instructions to use tangledgroup/tangled-alpha-0.13-core with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tangledgroup/tangled-alpha-0.13-core with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tangledgroup/tangled-alpha-0.13-core")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tangledgroup/tangled-alpha-0.13-core", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tangledgroup/tangled-alpha-0.13-core with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tangledgroup/tangled-alpha-0.13-core" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tangledgroup/tangled-alpha-0.13-core", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tangledgroup/tangled-alpha-0.13-core
- SGLang
How to use tangledgroup/tangled-alpha-0.13-core 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 "tangledgroup/tangled-alpha-0.13-core" \ --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": "tangledgroup/tangled-alpha-0.13-core", "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 "tangledgroup/tangled-alpha-0.13-core" \ --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": "tangledgroup/tangled-alpha-0.13-core", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tangledgroup/tangled-alpha-0.13-core with Docker Model Runner:
docker model run hf.co/tangledgroup/tangled-alpha-0.13-core
| roles_map = { | |
| 'system': 'system', | |
| 'user': 'user', | |
| 'human': 'user', | |
| 'assistant': 'assistant', | |
| 'gpt': 'assistant', | |
| 'AI': 'assistant', | |
| } | |
| R1_SYSTEM_PROMPT = '''\ | |
| You are an AI assistant. | |
| Your primary directive is to provide well-reasoned, structured, and extensively detailed responses. | |
| Formatting Requirements: | |
| - Structure your replies using: <think>{reasoning}</think>{answer} | |
| - The <think></think> block should contain at least six reasoning steps when applicable. | |
| - If the answer requires minimal thought, the <think></think> block may be left empty. | |
| - The user does not see the <think></think> section. Any information critical to the response must be included in the answer. | |
| - If you notice that you have engaged in circular reasoning or repetition, immediately terminate {reasoning} with a </think> and proceed to the {answer} | |
| Response Guidelines: | |
| - Detailed and Structured: Use rich Markdown formatting for clarity and readability. | |
| - Scientific and Logical Approach: Your explanations should reflect the depth and precision of the greatest scientific minds. | |
| - Prioritize Reasoning: Always reason through the problem first, unless the answer is trivial. | |
| - Concise yet Complete: Ensure responses are informative, yet to the point without unnecessary elaboration. | |
| - Maintain a professional, intelligent, and analytical tone in all interactions. | |
| If user provides <question>...</question> and expects <answer>...</answer>: | |
| - Structure your replies using: <question>{User’s exact input}</question><think>{reasoning}</think><answer>{answer}</answer>''' | |
| base_instruct_datasets = [ | |
| # 65.7 MB, 11,578 | |
| # 1.89k | |
| {'kind': 'instruct', 'path': 'NousResearch/hermes-function-calling-v1', 'data_files': 'func-calling-singleturn.json', 'split': 'train', 'field': 'conversations', 'transform': lambda msgs: [ | |
| {'role': roles_map[m['from']], 'content': m['value']} | |
| for m in msgs | |
| ]}, | |
| # 21.1 MB, 1,000 | |
| {'kind': 'instruct', 'path': 'simplescaling/s1K-1.1', 'split': 'train[0%:50%]', 'transform': lambda r: [ | |
| {'role': 'system', 'content': R1_SYSTEM_PROMPT}, | |
| {'role': 'user', 'content': r.get('question') or ''}, | |
| {'role': 'assistant', 'content': '<think>\n' + (r.get('deepseek_thinking_trajectory') or '') + '\n</think>\n' + (r.get('solution') or '')}, | |
| ]}, | |
| {'kind': 'instruct', 'path': 'simplescaling/s1K-1.1', 'split': 'train[50%:100%]', 'transform': lambda r: [ | |
| {'role': 'system', 'content': R1_SYSTEM_PROMPT}, | |
| {'role': 'user', 'content': r.get('question') or ''}, | |
| {'role': 'assistant', 'content': '<question>\n' + (r.get('question') or '') + '\n</question>\n<think>\n' + (r.get('deepseek_thinking_trajectory') or '') + '\n</think>\n<answer>\n' + (r.get('solution') or '') + '\n</answer>'}, | |
| ]}, | |
| ] | |