Instructions to use tangledgroup/tangled-alpha-0.12-core with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tangledgroup/tangled-alpha-0.12-core with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tangledgroup/tangled-alpha-0.12-core")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tangledgroup/tangled-alpha-0.12-core", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tangledgroup/tangled-alpha-0.12-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.12-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.12-core", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tangledgroup/tangled-alpha-0.12-core
- SGLang
How to use tangledgroup/tangled-alpha-0.12-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.12-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.12-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.12-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.12-core", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tangledgroup/tangled-alpha-0.12-core with Docker Model Runner:
docker model run hf.co/tangledgroup/tangled-alpha-0.12-core
pretrain
Browse files
scripts/pretrain_base_model_0.yaml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
# The name of the model to pretrain. Choose from names in ``litgpt.config``. Mutually exclusive with
|
| 2 |
# ``model_config``. (type: Optional[str], default: null)
|
| 3 |
-
model_name: 'tangled-alpha-0.12-
|
| 4 |
|
| 5 |
# A ``litgpt.Config`` object to define the model architecture. Mutually exclusive with
|
| 6 |
# ``model_config``. (type: Optional[Config], default: null)
|
| 7 |
model_config:
|
| 8 |
-
name: 'tangled-alpha-0.12-
|
| 9 |
block_size: 131072
|
| 10 |
vocab_size: 65536
|
| 11 |
padded_vocab_size: 65536
|
|
@@ -25,7 +25,7 @@ model_config:
|
|
| 25 |
|
| 26 |
# Directory in which to save checkpoints and logs. If running in a Lightning Studio Job, look for it in
|
| 27 |
# /teamspace/jobs/<job-name>/share. (type: <class 'Path'>, default: out/pretrain)
|
| 28 |
-
out_dir: "../out/pretrain-
|
| 29 |
|
| 30 |
# The precision to use for pretraining. Possible choices: "bf16-true", "bf16-mixed", "32-true". (type: Optional[str], default: null)
|
| 31 |
# precision: bf16-mixed
|
|
@@ -61,7 +61,7 @@ train:
|
|
| 61 |
global_batch_size: 512
|
| 62 |
|
| 63 |
# Number of samples per data-parallel rank (type: int, default: 4)
|
| 64 |
-
micro_batch_size:
|
| 65 |
|
| 66 |
# Number of iterations with learning rate warmup active (type: int, default: 2000)
|
| 67 |
lr_warmup_steps: 2000
|
|
|
|
| 1 |
# The name of the model to pretrain. Choose from names in ``litgpt.config``. Mutually exclusive with
|
| 2 |
# ``model_config``. (type: Optional[str], default: null)
|
| 3 |
+
model_name: 'tangled-alpha-0.12-base'
|
| 4 |
|
| 5 |
# A ``litgpt.Config`` object to define the model architecture. Mutually exclusive with
|
| 6 |
# ``model_config``. (type: Optional[Config], default: null)
|
| 7 |
model_config:
|
| 8 |
+
name: 'tangled-alpha-0.12-base'
|
| 9 |
block_size: 131072
|
| 10 |
vocab_size: 65536
|
| 11 |
padded_vocab_size: 65536
|
|
|
|
| 25 |
|
| 26 |
# Directory in which to save checkpoints and logs. If running in a Lightning Studio Job, look for it in
|
| 27 |
# /teamspace/jobs/<job-name>/share. (type: <class 'Path'>, default: out/pretrain)
|
| 28 |
+
out_dir: "../out/pretrain-base-0/"
|
| 29 |
|
| 30 |
# The precision to use for pretraining. Possible choices: "bf16-true", "bf16-mixed", "32-true". (type: Optional[str], default: null)
|
| 31 |
# precision: bf16-mixed
|
|
|
|
| 61 |
global_batch_size: 512
|
| 62 |
|
| 63 |
# Number of samples per data-parallel rank (type: int, default: 4)
|
| 64 |
+
micro_batch_size: 2
|
| 65 |
|
| 66 |
# Number of iterations with learning rate warmup active (type: int, default: 2000)
|
| 67 |
lr_warmup_steps: 2000
|