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-300/trainer_state.json from talha2134/StructuraAI: direct link, hf CLI and curl.
- Browser
- Download file 10.1 kB
-
https://huggingface.co/talha2134/StructuraAI/resolve/main/checkpoint-300/trainer_state.json
- Command line
-
hf download hf://talha2134/StructuraAI/checkpoint-300/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/talha2134/StructuraAI/resolve/main/checkpoint-300/trainer_state.json
10.1 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 300, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 0.2541474960744381, | |
| "epoch": 0.03333333333333333, | |
| "grad_norm": 20.57740592956543, | |
| "learning_rate": 2.25e-06, | |
| "loss": 1.2014720916748047, | |
| "mean_token_accuracy": 0.8318550638854504, | |
| "num_tokens": 8965.0, | |
| "step": 10 | |
| }, | |
| { | |
| "entropy": 0.21709268912672997, | |
| "epoch": 0.06666666666666667, | |
| "grad_norm": 4.629719257354736, | |
| "learning_rate": 4.75e-06, | |
| "loss": 0.1676112174987793, | |
| "mean_token_accuracy": 0.9542122773826123, | |
| "num_tokens": 17952.0, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 0.04367311222013086, | |
| "epoch": 0.1, | |
| "grad_norm": 3.792235851287842, | |
| "learning_rate": 7.25e-06, | |
| "loss": 0.049712646007537845, | |
| "mean_token_accuracy": 0.9874367646872997, | |
| "num_tokens": 26979.0, | |
| "step": 30 | |
| }, | |
| { | |
| "entropy": 0.02119373526365962, | |
| "epoch": 0.13333333333333333, | |
| "grad_norm": 3.274411916732788, | |
| "learning_rate": 9.75e-06, | |
| "loss": 0.026355266571044922, | |
| "mean_token_accuracy": 0.9928766153752804, | |
| "num_tokens": 35888.0, | |
| "step": 40 | |
| }, | |
| { | |
| "entropy": 0.014564405324927065, | |
| "epoch": 0.16666666666666666, | |
| "grad_norm": 2.9832940101623535, | |
| "learning_rate": 1.2250000000000001e-05, | |
| "loss": 0.014430022239685059, | |
| "mean_token_accuracy": 0.9946136698126793, | |
| "num_tokens": 44928.0, | |
| "step": 50 | |
| }, | |
| { | |
| "entropy": 0.012657651613699273, | |
| "epoch": 0.2, | |
| "grad_norm": 1.6452276706695557, | |
| "learning_rate": 1.4750000000000003e-05, | |
| "loss": 0.01906389892101288, | |
| "mean_token_accuracy": 0.9957529552280903, | |
| "num_tokens": 54401.0, | |
| "step": 60 | |
| }, | |
| { | |
| "entropy": 0.014276252112176735, | |
| "epoch": 0.23333333333333334, | |
| "grad_norm": 4.210626602172852, | |
| "learning_rate": 1.7250000000000003e-05, | |
| "loss": 0.022209084033966063, | |
| "mean_token_accuracy": 0.9940940722823143, | |
| "num_tokens": 63619.0, | |
| "step": 70 | |
| }, | |
| { | |
| "entropy": 0.008836911616526777, | |
| "epoch": 0.26666666666666666, | |
| "grad_norm": 1.6305017471313477, | |
| "learning_rate": 1.9750000000000002e-05, | |
| "loss": 0.011573268473148346, | |
| "mean_token_accuracy": 0.9975150354206562, | |
| "num_tokens": 72479.0, | |
| "step": 80 | |
| }, | |
| { | |
| "entropy": 0.01009038280317327, | |
| "epoch": 0.3, | |
| "grad_norm": 0.9021514058113098, | |
| "learning_rate": 1.991752704735903e-05, | |
| "loss": 0.016028505563735963, | |
| "mean_token_accuracy": 0.9965380400419235, | |
| "num_tokens": 81938.0, | |
| "step": 90 | |
| }, | |
| { | |
| "entropy": 0.015541268937522546, | |
| "epoch": 0.3333333333333333, | |
| "grad_norm": 2.7816500663757324, | |
| "learning_rate": 1.963418141372579e-05, | |
| "loss": 0.02004770189523697, | |
| "mean_token_accuracy": 0.9949544809758664, | |
| "num_tokens": 90673.0, | |
| "step": 100 | |
| }, | |
| { | |
| "entropy": 0.006992105186509434, | |
| "epoch": 0.36666666666666664, | |
| "grad_norm": 0.4811384975910187, | |
| "learning_rate": 1.9154711629194062e-05, | |
| "loss": 0.01020050048828125, | |
| "mean_token_accuracy": 0.9973767146468162, | |
| "num_tokens": 99329.0, | |
| "step": 110 | |
| }, | |
| { | |
| "entropy": 0.005494147675744898, | |
| "epoch": 0.4, | |
| "grad_norm": 3.757383346557617, | |
| "learning_rate": 1.8488878315900228e-05, | |
| "loss": 0.020347821712493896, | |
| "mean_token_accuracy": 0.9959160320460796, | |
| "num_tokens": 108738.0, | |
| "step": 120 | |
| }, | |
| { | |
| "entropy": 0.010232407180592418, | |
| "epoch": 0.43333333333333335, | |
| "grad_norm": 2.525506019592285, | |
| "learning_rate": 1.7650235919998234e-05, | |
| "loss": 0.022309882938861846, | |
| "mean_token_accuracy": 0.9968806192278862, | |
| "num_tokens": 118003.0, | |
| "step": 130 | |
| }, | |
| { | |
| "entropy": 0.011040263500763103, | |
| "epoch": 0.4666666666666667, | |
| "grad_norm": 1.2497626543045044, | |
| "learning_rate": 1.6655856782223682e-05, | |
| "loss": 0.007811000198125839, | |
| "mean_token_accuracy": 0.9990608915686607, | |
| "num_tokens": 127142.0, | |
| "step": 140 | |
| }, | |
| { | |
| "entropy": 0.00446975825507252, | |
| "epoch": 0.5, | |
| "grad_norm": 0.5883491039276123, | |
| "learning_rate": 1.5525983594269026e-05, | |
| "loss": 0.008252345025539398, | |
| "mean_token_accuracy": 0.9981305442750454, | |
| "num_tokens": 136450.0, | |
| "step": 150 | |
| }, | |
| { | |
| "entropy": 0.0029360003729379967, | |
| "epoch": 0.5333333333333333, | |
| "grad_norm": 2.269695520401001, | |
| "learning_rate": 1.4283617315955815e-05, | |
| "loss": 0.004468146711587906, | |
| "mean_token_accuracy": 0.9991006277501583, | |
| "num_tokens": 145771.0, | |
| "step": 160 | |
| }, | |
| { | |
| "entropy": 0.003923148625108297, | |
| "epoch": 0.5666666666666667, | |
| "grad_norm": 1.888706088066101, | |
| "learning_rate": 1.2954048942022002e-05, | |
| "loss": 0.008285583555698394, | |
| "mean_token_accuracy": 0.9980105623602867, | |
| "num_tokens": 154861.0, | |
| "step": 170 | |
| }, | |
| { | |
| "entropy": 0.0031986101297661663, | |
| "epoch": 0.6, | |
| "grad_norm": 0.5006175637245178, | |
| "learning_rate": 1.156434465040231e-05, | |
| "loss": 0.005604756250977516, | |
| "mean_token_accuracy": 0.9985296994447708, | |
| "num_tokens": 164135.0, | |
| "step": 180 | |
| }, | |
| { | |
| "entropy": 0.0029949808662422584, | |
| "epoch": 0.6333333333333333, | |
| "grad_norm": 1.4658639430999756, | |
| "learning_rate": 1.0142794812897874e-05, | |
| "loss": 0.004806124791502953, | |
| "mean_token_accuracy": 0.9990404114127159, | |
| "num_tokens": 173596.0, | |
| "step": 190 | |
| }, | |
| { | |
| "entropy": 0.0031491195324633734, | |
| "epoch": 0.6666666666666666, | |
| "grad_norm": 0.03332601860165596, | |
| "learning_rate": 8.718338084789074e-06, | |
| "loss": 0.0024261938408017157, | |
| "mean_token_accuracy": 0.9994210362434387, | |
| "num_tokens": 182805.0, | |
| "step": 200 | |
| }, | |
| { | |
| "entropy": 0.002200492888732697, | |
| "epoch": 0.7, | |
| "grad_norm": 0.02148531936109066, | |
| "learning_rate": 7.319972297266215e-06, | |
| "loss": 0.003504589572548866, | |
| "mean_token_accuracy": 0.9992057241499424, | |
| "num_tokens": 192483.0, | |
| "step": 210 | |
| }, | |
| { | |
| "entropy": 0.0014444994052610128, | |
| "epoch": 0.7333333333333333, | |
| "grad_norm": 1.3312201499938965, | |
| "learning_rate": 5.9761641452093225e-06, | |
| "loss": 0.0029927054420113564, | |
| "mean_token_accuracy": 0.9991533935070038, | |
| "num_tokens": 201008.0, | |
| "step": 220 | |
| }, | |
| { | |
| "entropy": 0.001568867818241415, | |
| "epoch": 0.7666666666666667, | |
| "grad_norm": 0.008915183134377003, | |
| "learning_rate": 4.714269687371581e-06, | |
| "loss": 0.010230810940265655, | |
| "mean_token_accuracy": 0.9989301681518554, | |
| "num_tokens": 209518.0, | |
| "step": 230 | |
| }, | |
| { | |
| "entropy": 0.002320073519149446, | |
| "epoch": 0.8, | |
| "grad_norm": 0.006626000162214041, | |
| "learning_rate": 3.5599774559114475e-06, | |
| "loss": 0.0015524291433393956, | |
| "mean_token_accuracy": 0.999731183052063, | |
| "num_tokens": 218684.0, | |
| "step": 240 | |
| }, | |
| { | |
| "entropy": 0.002853366254385037, | |
| "epoch": 0.8333333333333334, | |
| "grad_norm": 1.2881578207015991, | |
| "learning_rate": 2.5367855119575314e-06, | |
| "loss": 0.008888301998376846, | |
| "mean_token_accuracy": 0.9982558868825435, | |
| "num_tokens": 227948.0, | |
| "step": 250 | |
| }, | |
| { | |
| "entropy": 0.0017048829766281414, | |
| "epoch": 0.8666666666666667, | |
| "grad_norm": 0.23576189577579498, | |
| "learning_rate": 1.6655230928468257e-06, | |
| "loss": 0.002954983152449131, | |
| "mean_token_accuracy": 0.9991679608821868, | |
| "num_tokens": 237014.0, | |
| "step": 260 | |
| }, | |
| { | |
| "entropy": 0.002703834235398972, | |
| "epoch": 0.9, | |
| "grad_norm": 0.0059136939235031605, | |
| "learning_rate": 9.63926588919083e-07, | |
| "loss": 0.0027940746396780012, | |
| "mean_token_accuracy": 0.9991072505712509, | |
| "num_tokens": 246380.0, | |
| "step": 270 | |
| }, | |
| { | |
| "entropy": 0.0015751748214825056, | |
| "epoch": 0.9333333333333333, | |
| "grad_norm": 0.927148163318634, | |
| "learning_rate": 4.4627848175703315e-07, | |
| "loss": 0.005225488543510437, | |
| "mean_token_accuracy": 0.9994226850569248, | |
| "num_tokens": 255148.0, | |
| "step": 280 | |
| }, | |
| { | |
| "entropy": 0.0021627036914651397, | |
| "epoch": 0.9666666666666667, | |
| "grad_norm": 0.009538690559566021, | |
| "learning_rate": 1.231165940486234e-07, | |
| "loss": 0.003886735439300537, | |
| "mean_token_accuracy": 0.9997549019753933, | |
| "num_tokens": 264208.0, | |
| "step": 290 | |
| }, | |
| { | |
| "entropy": 0.0025621713868531513, | |
| "epoch": 1.0, | |
| "grad_norm": 0.0036688849795609713, | |
| "learning_rate": 1.019569905666984e-09, | |
| "loss": 0.0014917219057679176, | |
| "mean_token_accuracy": 0.9991249725222587, | |
| "num_tokens": 273039.0, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_entropy": 0.0024862780064480224, | |
| "eval_loss": 0.0024909197818487883, | |
| "eval_mean_token_accuracy": 0.9994468130668004, | |
| "eval_num_tokens": 273039.0, | |
| "eval_runtime": 48.6677, | |
| "eval_samples_per_second": 24.657, | |
| "eval_steps_per_second": 12.329, | |
| "step": 300 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 300, | |
| "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": 890651624079360.0, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |