Instructions to use briscoooe/tiny-cube-dagger with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use briscoooe/tiny-cube-dagger with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="briscoooe/tiny-cube-dagger")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("briscoooe/tiny-cube-dagger") model = AutoModelForCausalLM.from_pretrained("briscoooe/tiny-cube-dagger", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use briscoooe/tiny-cube-dagger with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "briscoooe/tiny-cube-dagger" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "briscoooe/tiny-cube-dagger", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/briscoooe/tiny-cube-dagger
- SGLang
How to use briscoooe/tiny-cube-dagger 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 "briscoooe/tiny-cube-dagger" \ --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": "briscoooe/tiny-cube-dagger", "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 "briscoooe/tiny-cube-dagger" \ --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": "briscoooe/tiny-cube-dagger", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use briscoooe/tiny-cube-dagger with Docker Model Runner:
docker model run hf.co/briscoooe/tiny-cube-dagger
File size: 1,546 Bytes
bce3b06 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | """
Checks a generated dataset by replaying it: applies each recorded solution to its
recorded state and confirms the cube ends solved.
This is the one check worth running on every dataset before training on it. A
generator bug that corrupts states or mislabels them is silent otherwise -- the
model simply learns the wrong function and the failure only surfaces much later,
as a bad benchmark number that looks like a modelling problem.
"""
import argparse, json, sys
from gen_data import SOLVED, apply_sequence
def main():
p = argparse.ArgumentParser(description=__doc__)
p.add_argument("path")
p.add_argument("--limit", type=int, default=0, help="Check only the first N rows (0 = all).")
args = p.parse_args()
checked = failed = 0
lengths = []
with open(args.path) as fh:
for line in fh:
if args.limit and checked >= args.limit:
break
row = json.loads(line)
if len(row["state"]) != 54:
failed += 1
continue
moves = row["solution"].split()
lengths.append(len(moves))
if apply_sequence(row["state"], moves) != SOLVED:
failed += 1
checked += 1
mean = sum(lengths) / len(lengths) if lengths else 0
print(f"checked {checked}, solved {checked - failed}, FAILED {failed}")
print(f"solution length: mean {mean:.2f} min {min(lengths, default=0)} max {max(lengths, default=0)}")
sys.exit(1 if failed else 0)
if __name__ == "__main__":
main()
|