Text Generation
Transformers
Safetensors
Polish
English
llama
typed-decisions
decision-making
classification
calibration
polish
conversational
text-generation-inference
Instructions to use Remek/basal-2.0-max with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Remek/basal-2.0-max with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Remek/basal-2.0-max") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Remek/basal-2.0-max") model = AutoModelForCausalLM.from_pretrained("Remek/basal-2.0-max", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Remek/basal-2.0-max with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Remek/basal-2.0-max" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Remek/basal-2.0-max", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Remek/basal-2.0-max
- SGLang
How to use Remek/basal-2.0-max 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 "Remek/basal-2.0-max" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Remek/basal-2.0-max", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Remek/basal-2.0-max" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Remek/basal-2.0-max", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Remek/basal-2.0-max with Docker Model Runner:
docker model run hf.co/Remek/basal-2.0-max
Download CALIBRATION.json from Remek/basal-2.0-max: direct link, hf CLI and curl.
- Browser
- Download file 3.74 kB
-
https://huggingface.co/Remek/basal-2.0-max/resolve/main/CALIBRATION.json
- Command line
-
hf download hf://Remek/basal-2.0-max/CALIBRATION.json
-
curl -L -o CALIBRATION.json https://huggingface.co/Remek/basal-2.0-max/resolve/main/CALIBRATION.json
3.74 kB
| { | |
| "prompt": 2, | |
| "orders": 1, | |
| "method": "temperature per question type and per option-count bucket (choice), by NLL, fitted on the out-of-distribution calibration split only; thresholds per type: the most permissive threshold whose accepted held-out calibration decisions (10 family folds, each refitted without its families) have a one-sided 95% Clopper-Pearson upper bound <= max_error; a type without one defers", | |
| "temperature_per_prim": { | |
| "choice": 1.3542555469368927, | |
| "noul": 2.4130090616010436, | |
| "score": 2.3107053937445454 | |
| }, | |
| "temperature_per_bucket": { | |
| "choice": { | |
| "2-10": 1.6339154532410998, | |
| "11-26": 1.2782470235604306, | |
| "27-255": 0.9038571383911009 | |
| } | |
| }, | |
| "thresholds": { | |
| "0.01": { | |
| "confidence": null, | |
| "method": "per type: the most permissive threshold whose accepted held-out calibration decisions (10 family folds, each refitted without its families) have a one-sided 95% Clopper-Pearson upper bound <= max_error; a type without one defers", | |
| "per_type": { | |
| "choice": { | |
| "confidence": null, | |
| "heldout_coverage": 0.0, | |
| "heldout_error": null | |
| }, | |
| "noul": { | |
| "confidence": null, | |
| "heldout_coverage": 0.0, | |
| "heldout_error": null | |
| }, | |
| "score": { | |
| "confidence": null, | |
| "heldout_coverage": 0.0, | |
| "heldout_error": null | |
| } | |
| }, | |
| "heldout_coverage": 0.0, | |
| "heldout_error": null | |
| }, | |
| "0.05": { | |
| "confidence": null, | |
| "method": "per type: the most permissive threshold whose accepted held-out calibration decisions (10 family folds, each refitted without its families) have a one-sided 95% Clopper-Pearson upper bound <= max_error; a type without one defers", | |
| "per_type": { | |
| "choice": { | |
| "confidence": 0.9343460250507047, | |
| "heldout_coverage": 0.5076638032676436, | |
| "heldout_error": 0.029694757796947524 | |
| }, | |
| "noul": { | |
| "confidence": 0.8903203843605327, | |
| "heldout_coverage": 0.4565752128666036, | |
| "heldout_error": 0.013675922088686288 | |
| }, | |
| "score": { | |
| "confidence": null, | |
| "heldout_coverage": 0.0, | |
| "heldout_error": null | |
| } | |
| }, | |
| "heldout_coverage": 0.4191786264090977, | |
| "heldout_error": 0.02511550764127468 | |
| } | |
| }, | |
| "gates": { | |
| "ece_lofo": { | |
| "choice": { | |
| "pooled": 0.02410796982582807, | |
| "n": 11874, | |
| "gate": 0.05, | |
| "pass": true | |
| }, | |
| "noul": { | |
| "pooled": 0.04203932516042977, | |
| "n": 5285, | |
| "gate": 0.05, | |
| "pass": true | |
| }, | |
| "score": { | |
| "pooled": 0.03959409092958942, | |
| "n": 2978, | |
| "gate": 0.05, | |
| "pass": true | |
| } | |
| }, | |
| "ece_worst_fold": 0.0984699552179725, | |
| "worst_fold": "agent", | |
| "automated_at": { | |
| "0.01": 0.0, | |
| "0.05": 0.4191786264090977 | |
| }, | |
| "automated_error": { | |
| "0.01": null, | |
| "0.05": 0.02511550764127468 | |
| }, | |
| "note": "held-out numbers: every evaluation row predicted by the fit without its family" | |
| }, | |
| "test": { | |
| "T": { | |
| "choice": { | |
| "acc": 0.8283644938521139, | |
| "ece": 0.022511433054648682, | |
| "n": 11874 | |
| }, | |
| "noul": { | |
| "acc": 0.868306527909177, | |
| "ece": 0.04224814168670232, | |
| "n": 5285 | |
| }, | |
| "score": { | |
| "acc": 0.6638683680322364, | |
| "ece": 0.039465735336162315, | |
| "n": 2978 | |
| }, | |
| "all": { | |
| "acc": 0.8145205343397726, | |
| "ece": 0.02335889271209342, | |
| "n": 20137 | |
| } | |
| }, | |
| "note": "evaluation pool (development and test splits), full fit" | |
| }, | |
| "n": { | |
| "fit": 3560, | |
| "many": 1500, | |
| "eval": 20137 | |
| }, | |
| "engine": "fast", | |
| "fitted_on": { | |
| "split": "out-of-distribution calibration split (sealed-seed BH-, JDI- and agent-shaped families, many-option items)", | |
| "orders": 1, | |
| "readouts": "basal-serve --mode fast, bf16" | |
| }, | |
| "certified_on": "the same split (held-out folds)", | |
| "evaluated_on": "development and test splits, leave-one-family-out and leave-one-language-out" | |
| } | |