Instructions to use mxguru1/trihead-intel-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mxguru1/trihead-intel-v2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("O:\hf_models\huihui-ai-Huihui-MoE-5B-A1.7B-abliterated") model = PeftModel.from_pretrained(base_model, "mxguru1/trihead-intel-v2") - Transformers
How to use mxguru1/trihead-intel-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mxguru1/trihead-intel-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mxguru1/trihead-intel-v2", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mxguru1/trihead-intel-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mxguru1/trihead-intel-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mxguru1/trihead-intel-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mxguru1/trihead-intel-v2
- SGLang
How to use mxguru1/trihead-intel-v2 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 "mxguru1/trihead-intel-v2" \ --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": "mxguru1/trihead-intel-v2", "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 "mxguru1/trihead-intel-v2" \ --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": "mxguru1/trihead-intel-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mxguru1/trihead-intel-v2 with Docker Model Runner:
docker model run hf.co/mxguru1/trihead-intel-v2
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 5.266666666666667, | |
| "eval_steps": 500, | |
| "global_step": 200, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 1.9170070752501487, | |
| "epoch": 0.26666666666666666, | |
| "grad_norm": 1.9796658754348755, | |
| "learning_rate": 0.000191, | |
| "loss": 2.268546485900879, | |
| "mean_token_accuracy": 0.5808952182531357, | |
| "num_tokens": 11182.0, | |
| "step": 10 | |
| }, | |
| { | |
| "entropy": 1.3337449461221695, | |
| "epoch": 0.5333333333333333, | |
| "grad_norm": 1.9896641969680786, | |
| "learning_rate": 0.000181, | |
| "loss": 1.388010311126709, | |
| "mean_token_accuracy": 0.6908908531069755, | |
| "num_tokens": 21589.0, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 1.2183324739336967, | |
| "epoch": 0.8, | |
| "grad_norm": 1.8034083843231201, | |
| "learning_rate": 0.000171, | |
| "loss": 1.2181035995483398, | |
| "mean_token_accuracy": 0.7146093145012855, | |
| "num_tokens": 32314.0, | |
| "step": 30 | |
| }, | |
| { | |
| "entropy": 1.1750043160036991, | |
| "epoch": 1.0533333333333332, | |
| "grad_norm": 1.5433615446090698, | |
| "learning_rate": 0.000161, | |
| "loss": 1.1678118705749512, | |
| "mean_token_accuracy": 0.7168187938238445, | |
| "num_tokens": 42388.0, | |
| "step": 40 | |
| }, | |
| { | |
| "entropy": 0.9561146259307861, | |
| "epoch": 1.32, | |
| "grad_norm": 2.1281228065490723, | |
| "learning_rate": 0.000151, | |
| "loss": 0.9908771514892578, | |
| "mean_token_accuracy": 0.7572208195924759, | |
| "num_tokens": 53083.0, | |
| "step": 50 | |
| }, | |
| { | |
| "entropy": 0.9963583812117577, | |
| "epoch": 1.5866666666666667, | |
| "grad_norm": 1.630143165588379, | |
| "learning_rate": 0.000141, | |
| "loss": 0.9744733810424805, | |
| "mean_token_accuracy": 0.7554196074604989, | |
| "num_tokens": 63731.0, | |
| "step": 60 | |
| }, | |
| { | |
| "entropy": 0.9944265052676201, | |
| "epoch": 1.8533333333333335, | |
| "grad_norm": 1.654884934425354, | |
| "learning_rate": 0.000131, | |
| "loss": 0.9664114952087403, | |
| "mean_token_accuracy": 0.7561696007847786, | |
| "num_tokens": 74699.0, | |
| "step": 70 | |
| }, | |
| { | |
| "entropy": 0.9411817443998236, | |
| "epoch": 2.1066666666666665, | |
| "grad_norm": 1.7052056789398193, | |
| "learning_rate": 0.000121, | |
| "loss": 0.9031502723693847, | |
| "mean_token_accuracy": 0.762868975338183, | |
| "num_tokens": 84644.0, | |
| "step": 80 | |
| }, | |
| { | |
| "entropy": 0.8191767290234566, | |
| "epoch": 2.3733333333333335, | |
| "grad_norm": 2.0393669605255127, | |
| "learning_rate": 0.00011100000000000001, | |
| "loss": 0.7797015190124512, | |
| "mean_token_accuracy": 0.791885232925415, | |
| "num_tokens": 95002.0, | |
| "step": 90 | |
| }, | |
| { | |
| "entropy": 0.8056554242968559, | |
| "epoch": 2.64, | |
| "grad_norm": 2.1560182571411133, | |
| "learning_rate": 0.000101, | |
| "loss": 0.8135014533996582, | |
| "mean_token_accuracy": 0.7863634616136551, | |
| "num_tokens": 105756.0, | |
| "step": 100 | |
| }, | |
| { | |
| "entropy": 0.8081967368721962, | |
| "epoch": 2.9066666666666667, | |
| "grad_norm": 1.7059458494186401, | |
| "learning_rate": 9.1e-05, | |
| "loss": 0.7536397457122803, | |
| "mean_token_accuracy": 0.7966530859470368, | |
| "num_tokens": 116898.0, | |
| "step": 110 | |
| }, | |
| { | |
| "entropy": 0.7223009796519029, | |
| "epoch": 3.16, | |
| "grad_norm": 1.9718010425567627, | |
| "learning_rate": 8.1e-05, | |
| "loss": 0.673548412322998, | |
| "mean_token_accuracy": 0.8069309937326532, | |
| "num_tokens": 127115.0, | |
| "step": 120 | |
| }, | |
| { | |
| "entropy": 0.6732238903641701, | |
| "epoch": 3.4266666666666667, | |
| "grad_norm": 2.1912002563476562, | |
| "learning_rate": 7.1e-05, | |
| "loss": 0.6623841762542725, | |
| "mean_token_accuracy": 0.8132106065750122, | |
| "num_tokens": 137496.0, | |
| "step": 130 | |
| }, | |
| { | |
| "entropy": 0.6554848097264767, | |
| "epoch": 3.6933333333333334, | |
| "grad_norm": 2.294579267501831, | |
| "learning_rate": 6.1e-05, | |
| "loss": 0.6600570678710938, | |
| "mean_token_accuracy": 0.8172469675540924, | |
| "num_tokens": 148536.0, | |
| "step": 140 | |
| }, | |
| { | |
| "entropy": 0.6367053695023059, | |
| "epoch": 3.96, | |
| "grad_norm": 1.9122933149337769, | |
| "learning_rate": 5.1000000000000006e-05, | |
| "loss": 0.599355936050415, | |
| "mean_token_accuracy": 0.835531035065651, | |
| "num_tokens": 159666.0, | |
| "step": 150 | |
| }, | |
| { | |
| "entropy": 0.6491185544352782, | |
| "epoch": 4.213333333333333, | |
| "grad_norm": 2.146390914916992, | |
| "learning_rate": 4.1e-05, | |
| "loss": 0.5909181118011475, | |
| "mean_token_accuracy": 0.8315925158952412, | |
| "num_tokens": 169076.0, | |
| "step": 160 | |
| }, | |
| { | |
| "entropy": 0.600107691437006, | |
| "epoch": 4.48, | |
| "grad_norm": 2.5462963581085205, | |
| "learning_rate": 3.1e-05, | |
| "loss": 0.575223731994629, | |
| "mean_token_accuracy": 0.8364185154438019, | |
| "num_tokens": 179847.0, | |
| "step": 170 | |
| }, | |
| { | |
| "entropy": 0.5227418705821038, | |
| "epoch": 4.746666666666667, | |
| "grad_norm": 1.9321998357772827, | |
| "learning_rate": 2.1e-05, | |
| "loss": 0.49827256202697756, | |
| "mean_token_accuracy": 0.8532083705067635, | |
| "num_tokens": 190908.0, | |
| "step": 180 | |
| }, | |
| { | |
| "entropy": 0.5639589726924896, | |
| "epoch": 5.0, | |
| "grad_norm": 3.5353951454162598, | |
| "learning_rate": 1.1000000000000001e-05, | |
| "loss": 0.5473646640777587, | |
| "mean_token_accuracy": 0.8418466150760651, | |
| "num_tokens": 201280.0, | |
| "step": 190 | |
| }, | |
| { | |
| "entropy": 0.5659432150423527, | |
| "epoch": 5.266666666666667, | |
| "grad_norm": 2.2689785957336426, | |
| "learning_rate": 1.0000000000000002e-06, | |
| "loss": 0.5021356582641602, | |
| "mean_token_accuracy": 0.8571663558483124, | |
| "num_tokens": 211738.0, | |
| "step": 200 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 200, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 6, | |
| "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": 6222709689741312.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |