Text Generation
Transformers
Safetensors
qwen3
Generated from Trainer
sft
trl
json
information-extraction
conversational
text-generation-inference
Instructions to use talha2134/StructuraAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use talha2134/StructuraAI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="talha2134/StructuraAI") 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("talha2134/StructuraAI") model = AutoModelForCausalLM.from_pretrained("talha2134/StructuraAI", 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 talha2134/StructuraAI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "talha2134/StructuraAI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "talha2134/StructuraAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/talha2134/StructuraAI
- SGLang
How to use talha2134/StructuraAI 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 "talha2134/StructuraAI" \ --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": "talha2134/StructuraAI", "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 "talha2134/StructuraAI" \ --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": "talha2134/StructuraAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use talha2134/StructuraAI with Docker Model Runner:
docker model run hf.co/talha2134/StructuraAI
Download checkpoint-250/trainer_state.json from talha2134/StructuraAI: direct link, hf CLI and curl.
- Browser
- Download file 8.32 kB
-
https://huggingface.co/talha2134/StructuraAI/resolve/main/checkpoint-250/trainer_state.json
- Command line
-
hf download hf://talha2134/StructuraAI/checkpoint-250/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/talha2134/StructuraAI/resolve/main/checkpoint-250/trainer_state.json
8.32 kB
Invalid JSON:Unexpected token 'I', ..."ad_norm": Infinity,
"... is not valid JSON
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 250, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 0.21428584409877657, | |
| "epoch": 0.04, | |
| "grad_norm": 18.10478401184082, | |
| "learning_rate": 2.25e-06, | |
| "loss": 0.8510298728942871, | |
| "mean_token_accuracy": 0.8737400010228157, | |
| "num_tokens": 14151.0, | |
| "step": 10 | |
| }, | |
| { | |
| "entropy": 0.160756517178379, | |
| "epoch": 0.08, | |
| "grad_norm": 3.575857639312744, | |
| "learning_rate": 4.75e-06, | |
| "loss": 0.09687719941139221, | |
| "mean_token_accuracy": 0.9724970616400241, | |
| "num_tokens": 27771.0, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 0.012228575903282034, | |
| "epoch": 0.12, | |
| "grad_norm": 0.532827615737915, | |
| "learning_rate": 7.25e-06, | |
| "loss": 0.006492076069116592, | |
| "mean_token_accuracy": 0.9983568988740444, | |
| "num_tokens": 41800.0, | |
| "step": 30 | |
| }, | |
| { | |
| "entropy": 0.003288323507149471, | |
| "epoch": 0.16, | |
| "grad_norm": 0.21660776436328888, | |
| "learning_rate": 9.75e-06, | |
| "loss": 0.005933599546551704, | |
| "mean_token_accuracy": 0.9990735344588757, | |
| "num_tokens": 55624.0, | |
| "step": 40 | |
| }, | |
| { | |
| "entropy": 0.0040198622158641225, | |
| "epoch": 0.2, | |
| "grad_norm": Infinity, | |
| "learning_rate": 1.2250000000000001e-05, | |
| "loss": 0.01021272987127304, | |
| "mean_token_accuracy": 0.9983254633843899, | |
| "num_tokens": 69406.0, | |
| "step": 50 | |
| }, | |
| { | |
| "entropy": 0.00444575465444359, | |
| "epoch": 0.24, | |
| "grad_norm": 0.22442828118801117, | |
| "learning_rate": 1.4750000000000003e-05, | |
| "loss": 0.008642087131738663, | |
| "mean_token_accuracy": 0.9984390832483768, | |
| "num_tokens": 83846.0, | |
| "step": 60 | |
| }, | |
| { | |
| "entropy": 0.0036996657614508876, | |
| "epoch": 0.28, | |
| "grad_norm": 0.9080382585525513, | |
| "learning_rate": 1.7250000000000003e-05, | |
| "loss": 0.00542040728032589, | |
| "mean_token_accuracy": 0.9984924353659153, | |
| "num_tokens": 97769.0, | |
| "step": 70 | |
| }, | |
| { | |
| "entropy": 0.0036402907739102376, | |
| "epoch": 0.32, | |
| "grad_norm": 0.8453801274299622, | |
| "learning_rate": 1.9750000000000002e-05, | |
| "loss": 0.00488629937171936, | |
| "mean_token_accuracy": 0.9989219449460507, | |
| "num_tokens": 111586.0, | |
| "step": 80 | |
| }, | |
| { | |
| "entropy": 0.0045589786401251334, | |
| "epoch": 0.36, | |
| "grad_norm": 0.11368972063064575, | |
| "learning_rate": 1.9862007473534026e-05, | |
| "loss": 0.013631081581115723, | |
| "mean_token_accuracy": 0.9988852135837079, | |
| "num_tokens": 125179.0, | |
| "step": 90 | |
| }, | |
| { | |
| "entropy": 0.004993680529514677, | |
| "epoch": 0.4, | |
| "grad_norm": 0.04809768125414848, | |
| "learning_rate": 1.938988360615057e-05, | |
| "loss": 0.0035428468137979506, | |
| "mean_token_accuracy": 0.998937013745308, | |
| "num_tokens": 138852.0, | |
| "step": 100 | |
| }, | |
| { | |
| "entropy": 0.001971575218340149, | |
| "epoch": 0.44, | |
| "grad_norm": 0.6760706901550293, | |
| "learning_rate": 1.8597998514483724e-05, | |
| "loss": 0.0014225086197257042, | |
| "mean_token_accuracy": 0.9996236175298691, | |
| "num_tokens": 152654.0, | |
| "step": 110 | |
| }, | |
| { | |
| "entropy": 0.003421137977966282, | |
| "epoch": 0.48, | |
| "grad_norm": 0.27822941541671753, | |
| "learning_rate": 1.7513318895568734e-05, | |
| "loss": 0.004925555363297462, | |
| "mean_token_accuracy": 0.9988558046519757, | |
| "num_tokens": 166858.0, | |
| "step": 120 | |
| }, | |
| { | |
| "entropy": 0.0039996854819037255, | |
| "epoch": 0.52, | |
| "grad_norm": 1.5688544511795044, | |
| "learning_rate": 1.617278221289793e-05, | |
| "loss": 0.005141415074467659, | |
| "mean_token_accuracy": 0.9986752301454545, | |
| "num_tokens": 180662.0, | |
| "step": 130 | |
| }, | |
| { | |
| "entropy": 0.0032179811569221783, | |
| "epoch": 0.56, | |
| "grad_norm": 0.5999836921691895, | |
| "learning_rate": 1.4622038835403135e-05, | |
| "loss": 0.007120413333177566, | |
| "mean_token_accuracy": 0.9982926174998283, | |
| "num_tokens": 194466.0, | |
| "step": 140 | |
| }, | |
| { | |
| "entropy": 0.00556161149579566, | |
| "epoch": 0.6, | |
| "grad_norm": 0.6016015410423279, | |
| "learning_rate": 1.2913897468893249e-05, | |
| "loss": 0.006519787013530731, | |
| "mean_token_accuracy": 0.9988876305520534, | |
| "num_tokens": 208687.0, | |
| "step": 150 | |
| }, | |
| { | |
| "entropy": 0.004234323819764541, | |
| "epoch": 0.64, | |
| "grad_norm": 0.10426495969295502, | |
| "learning_rate": 1.1106526818915008e-05, | |
| "loss": 0.003968219459056854, | |
| "mean_token_accuracy": 0.9992130346596241, | |
| "num_tokens": 222196.0, | |
| "step": 160 | |
| }, | |
| { | |
| "entropy": 0.004318612313727499, | |
| "epoch": 0.68, | |
| "grad_norm": 0.592086136341095, | |
| "learning_rate": 9.261474725251261e-06, | |
| "loss": 0.0027186399325728416, | |
| "mean_token_accuracy": 0.9992783538997173, | |
| "num_tokens": 236017.0, | |
| "step": 170 | |
| }, | |
| { | |
| "entropy": 0.0027393732792916126, | |
| "epoch": 0.72, | |
| "grad_norm": 0.022149214521050453, | |
| "learning_rate": 7.441572224055644e-06, | |
| "loss": 0.00479930192232132, | |
| "mean_token_accuracy": 0.9989941589534282, | |
| "num_tokens": 249817.0, | |
| "step": 180 | |
| }, | |
| { | |
| "entropy": 0.00216524681154624, | |
| "epoch": 0.76, | |
| "grad_norm": 0.56014084815979, | |
| "learning_rate": 5.708793912273911e-06, | |
| "loss": 0.0027483755722641943, | |
| "mean_token_accuracy": 0.9990876615047455, | |
| "num_tokens": 263576.0, | |
| "step": 190 | |
| }, | |
| { | |
| "entropy": 0.0015900599011729355, | |
| "epoch": 0.8, | |
| "grad_norm": 0.004817851819097996, | |
| "learning_rate": 4.12214747707527e-06, | |
| "loss": 0.0033500555902719496, | |
| "mean_token_accuracy": 0.9993965141475201, | |
| "num_tokens": 277813.0, | |
| "step": 200 | |
| }, | |
| { | |
| "entropy": 0.0017282809834796354, | |
| "epoch": 0.84, | |
| "grad_norm": 0.14628136157989502, | |
| "learning_rate": 2.7356642598377604e-06, | |
| "loss": 0.0011582623235881328, | |
| "mean_token_accuracy": 0.9995593398809433, | |
| "num_tokens": 291553.0, | |
| "step": 210 | |
| }, | |
| { | |
| "entropy": 0.0023846508154747427, | |
| "epoch": 0.88, | |
| "grad_norm": 0.1628681719303131, | |
| "learning_rate": 1.596559283621074e-06, | |
| "loss": 0.0023809488862752914, | |
| "mean_token_accuracy": 0.9993991985917091, | |
| "num_tokens": 305818.0, | |
| "step": 220 | |
| }, | |
| { | |
| "entropy": 0.002279981541505549, | |
| "epoch": 0.92, | |
| "grad_norm": 0.06588999181985855, | |
| "learning_rate": 7.43623402184438e-07, | |
| "loss": 0.001882055588066578, | |
| "mean_token_accuracy": 0.9993162535130977, | |
| "num_tokens": 319432.0, | |
| "step": 230 | |
| }, | |
| { | |
| "entropy": 0.0012012076569590136, | |
| "epoch": 0.96, | |
| "grad_norm": 0.026361851021647453, | |
| "learning_rate": 2.0590232398634114e-07, | |
| "loss": 0.0009036454372107983, | |
| "mean_token_accuracy": 0.9998511902987957, | |
| "num_tokens": 333314.0, | |
| "step": 240 | |
| }, | |
| { | |
| "entropy": 0.0013432753296001465, | |
| "epoch": 1.0, | |
| "grad_norm": 0.01848655752837658, | |
| "learning_rate": 1.7074954194729044e-09, | |
| "loss": 0.004537679627537728, | |
| "mean_token_accuracy": 0.9991299070417881, | |
| "num_tokens": 347038.0, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_entropy": 0.0023411999850650317, | |
| "eval_loss": 0.002938393736258149, | |
| "eval_mean_token_accuracy": 0.9993193801641465, | |
| "eval_num_tokens": 347038.0, | |
| "eval_runtime": 35.2817, | |
| "eval_samples_per_second": 28.343, | |
| "eval_steps_per_second": 14.172, | |
| "step": 250 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 250, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 1006570325409792.0, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |