Run this model with HF Jobs
Run BH-Language-AI/bs-base-375m-t2b on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/BH-Language-AI/bs-base-375m-t2b. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/BH-Language-AI/bs-base-375m-t2b on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/BH-Language-AI/bs-base-375m-t2b. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/BH-Language-AI/bs-base-375m-t2b. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use BH-Language-AI/bs-base-375m-t2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BH-Language-AI/bs-base-375m-t2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BH-Language-AI/bs-base-375m-t2b", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("BH-Language-AI/bs-base-375m-t2b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use BH-Language-AI/bs-base-375m-t2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BH-Language-AI/bs-base-375m-t2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BH-Language-AI/bs-base-375m-t2b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BH-Language-AI/bs-base-375m-t2b
- SGLang
How to use BH-Language-AI/bs-base-375m-t2b 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 "BH-Language-AI/bs-base-375m-t2b" \ --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": "BH-Language-AI/bs-base-375m-t2b", "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 "BH-Language-AI/bs-base-375m-t2b" \ --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": "BH-Language-AI/bs-base-375m-t2b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BH-Language-AI/bs-base-375m-t2b with Docker Model Runner:
docker model run hf.co/BH-Language-AI/bs-base-375m-t2b
Ogledala / mirrors: GitCode (AtomGit), CSDN i slični sajtovi automatski miroruju ovaj repo. Zvanična i jedina ažurirana verzija je ovdje na Hugging Face-u; kartice na ogledalima se ne ažuriraju (pa ispravke, npr. tokenizer od 2026-12-05, tamo mogu izostati).
Namjena
Base LM (375M, 2B tokena) — nastavlja tekst, nije instrukcijski niti tool-call model.
- Učio je 6 alata:
vremenska_prognoza,posalji_email,prevedi_tekst,otvori_aplikaciju,procitaj_fajl,kalkulator - Mjereno (BosnianBench 2.0, 77 itema sa tim alatima): name_acc 77,9 %, exact 31,2 %
- Na cijelom testu sa 24 alata: name_acc 23 %, exact 8 % — 18 alata nikad nije vidio
Nije za
- opšti razgovor, klasifikaciju, čitanje s razumijevanjem, temu teksta (SFT podaci su bili 100 % tool-call → ti zadaci na benchmarku mjere 0 %)
- alate van gornjih 6 (model će vratiti najbliži poznati)
Ograničenja
- izmišlja argumente koje nema u zahtjevu (npr. datum) — nije pouzdan za akcije bez validacije
- može nastaviti generisanje poslije poziva alata; koristiti stop sekvencu
</tool_call> - kontekst 1024 tokena
Tokenizer — obavezno pročitati
Do 2026-12-05 uz model je bio priložen pogrešan tokenizer (drugi BPE, drugačiji
redoslijed vokabulara) → izlaz je bio besmislen. Ispravljeno i provjereno
(bpb 0,735, koherentan bosanski). Ako ste preuzeli ranije, preuzmite ponovo.
Smoke test:
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("BH-Language-AI/bs-toolcall-375m-t4b-llama")
m = AutoModelForCausalLM.from_pretrained("BH-Language-AI/bs-toolcall-375m-t4b-llama")
p = 'Klasifikuj poruku u jednu od kategorija: upit, komanda, bezbedno, opasno.\nPoruka: "Da li radite subotom?"\nKategorija:'
print(tok.decode(m.generate(tok(p, return_tensors="pt").input_ids, max_new_tokens=8, do_sample=False)[0][tok(p).input_ids.__len__():], skip_special_tokens=True))
Porodica
| repo | šta je |
|---|---|
bs-base-375m-t2b |
base LM, 2B tokena |
bs-toolcall-375m-t4b |
ovaj model, native format |
bs-toolcall-375m-t4b-llama |
isti model, standardni LlamaForCausalLM |
- Downloads last month
- 808