Text Generation
Transformers
Safetensors
llama
Generated from Trainer
conversational
text-generation-inference
Instructions to use hiiamsid/yi_34B_8k_classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hiiamsid/yi_34B_8k_classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hiiamsid/yi_34B_8k_classification") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hiiamsid/yi_34B_8k_classification") model = AutoModelForCausalLM.from_pretrained("hiiamsid/yi_34B_8k_classification", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hiiamsid/yi_34B_8k_classification with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hiiamsid/yi_34B_8k_classification" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hiiamsid/yi_34B_8k_classification", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/hiiamsid/yi_34B_8k_classification
- SGLang
How to use hiiamsid/yi_34B_8k_classification 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 "hiiamsid/yi_34B_8k_classification" \ --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": "hiiamsid/yi_34B_8k_classification", "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 "hiiamsid/yi_34B_8k_classification" \ --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": "hiiamsid/yi_34B_8k_classification", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use hiiamsid/yi_34B_8k_classification with Docker Model Runner:
docker model run hf.co/hiiamsid/yi_34B_8k_classification
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 3.0, | |
| "eval_steps": 500, | |
| "global_step": 669, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.07, | |
| "learning_rate": 1.1194029850746268e-07, | |
| "loss": 2.3842, | |
| "step": 15 | |
| }, | |
| { | |
| "epoch": 0.13, | |
| "learning_rate": 2.2388059701492537e-07, | |
| "loss": 2.1216, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.2, | |
| "learning_rate": 3.3582089552238805e-07, | |
| "loss": 1.209, | |
| "step": 45 | |
| }, | |
| { | |
| "epoch": 0.27, | |
| "learning_rate": 4.4776119402985074e-07, | |
| "loss": 0.3572, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.34, | |
| "learning_rate": 4.997821619858613e-07, | |
| "loss": 0.2376, | |
| "step": 75 | |
| }, | |
| { | |
| "epoch": 0.4, | |
| "learning_rate": 4.982013320674148e-07, | |
| "loss": 0.2259, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.47, | |
| "learning_rate": 4.951004040601898e-07, | |
| "loss": 0.2179, | |
| "step": 105 | |
| }, | |
| { | |
| "epoch": 0.54, | |
| "learning_rate": 4.904983694607182e-07, | |
| "loss": 0.2312, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.61, | |
| "learning_rate": 4.844234132265139e-07, | |
| "loss": 0.2625, | |
| "step": 135 | |
| }, | |
| { | |
| "epoch": 0.67, | |
| "learning_rate": 4.769127411585451e-07, | |
| "loss": 0.2149, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.74, | |
| "learning_rate": 4.680123520359519e-07, | |
| "loss": 0.2285, | |
| "step": 165 | |
| }, | |
| { | |
| "epoch": 0.81, | |
| "learning_rate": 4.577767558985552e-07, | |
| "loss": 0.1952, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.87, | |
| "learning_rate": 4.4626864020252767e-07, | |
| "loss": 0.216, | |
| "step": 195 | |
| }, | |
| { | |
| "epoch": 0.94, | |
| "learning_rate": 4.3355848589383875e-07, | |
| "loss": 0.2209, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 0.1885647028684616, | |
| "eval_runtime": 84.9949, | |
| "eval_samples_per_second": 4.424, | |
| "eval_steps_per_second": 0.553, | |
| "step": 223 | |
| }, | |
| { | |
| "epoch": 1.01, | |
| "learning_rate": 4.197241357508159e-07, | |
| "loss": 0.2079, | |
| "step": 225 | |
| }, | |
| { | |
| "epoch": 1.08, | |
| "learning_rate": 4.048503176394893e-07, | |
| "loss": 0.1639, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 1.14, | |
| "learning_rate": 3.8902812560152067e-07, | |
| "loss": 0.2003, | |
| "step": 255 | |
| }, | |
| { | |
| "epoch": 1.21, | |
| "learning_rate": 3.7235446195277136e-07, | |
| "loss": 0.2023, | |
| "step": 270 | |
| }, | |
| { | |
| "epoch": 1.28, | |
| "learning_rate": 3.5493144380935153e-07, | |
| "loss": 0.2093, | |
| "step": 285 | |
| }, | |
| { | |
| "epoch": 1.35, | |
| "learning_rate": 3.3686577767585543e-07, | |
| "loss": 0.1862, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 1.41, | |
| "learning_rate": 3.182681059260903e-07, | |
| "loss": 0.2173, | |
| "step": 315 | |
| }, | |
| { | |
| "epoch": 1.48, | |
| "learning_rate": 2.992523291787476e-07, | |
| "loss": 0.1854, | |
| "step": 330 | |
| }, | |
| { | |
| "epoch": 1.55, | |
| "learning_rate": 2.79934908718098e-07, | |
| "loss": 0.1846, | |
| "step": 345 | |
| }, | |
| { | |
| "epoch": 1.61, | |
| "learning_rate": 2.604341532320033e-07, | |
| "loss": 0.2093, | |
| "step": 360 | |
| }, | |
| { | |
| "epoch": 1.68, | |
| "learning_rate": 2.4086949423558525e-07, | |
| "loss": 0.215, | |
| "step": 375 | |
| }, | |
| { | |
| "epoch": 1.75, | |
| "learning_rate": 2.21360754618191e-07, | |
| "loss": 0.2203, | |
| "step": 390 | |
| }, | |
| { | |
| "epoch": 1.82, | |
| "learning_rate": 2.020274147934019e-07, | |
| "loss": 0.2012, | |
| "step": 405 | |
| }, | |
| { | |
| "epoch": 1.88, | |
| "learning_rate": 1.8298788094652156e-07, | |
| "loss": 0.1801, | |
| "step": 420 | |
| }, | |
| { | |
| "epoch": 1.95, | |
| "learning_rate": 1.6435875986112683e-07, | |
| "loss": 0.232, | |
| "step": 435 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_loss": 0.1808764636516571, | |
| "eval_runtime": 84.9305, | |
| "eval_samples_per_second": 4.427, | |
| "eval_steps_per_second": 0.553, | |
| "step": 446 | |
| }, | |
| { | |
| "epoch": 2.02, | |
| "learning_rate": 1.4625414476597541e-07, | |
| "loss": 0.1974, | |
| "step": 450 | |
| }, | |
| { | |
| "epoch": 2.09, | |
| "learning_rate": 1.287849165760687e-07, | |
| "loss": 0.2059, | |
| "step": 465 | |
| }, | |
| { | |
| "epoch": 2.15, | |
| "learning_rate": 1.120580648073885e-07, | |
| "loss": 0.1932, | |
| "step": 480 | |
| }, | |
| { | |
| "epoch": 2.22, | |
| "learning_rate": 9.617603232433475e-08, | |
| "loss": 0.1538, | |
| "step": 495 | |
| }, | |
| { | |
| "epoch": 2.29, | |
| "learning_rate": 8.123608793292986e-08, | |
| "loss": 0.2281, | |
| "step": 510 | |
| }, | |
| { | |
| "epoch": 2.35, | |
| "learning_rate": 6.732973066231562e-08, | |
| "loss": 0.1934, | |
| "step": 525 | |
| }, | |
| { | |
| "epoch": 2.42, | |
| "learning_rate": 5.454212938299255e-08, | |
| "loss": 0.2006, | |
| "step": 540 | |
| }, | |
| { | |
| "epoch": 2.49, | |
| "learning_rate": 4.295160119383712e-08, | |
| "loss": 0.1785, | |
| "step": 555 | |
| }, | |
| { | |
| "epoch": 2.56, | |
| "learning_rate": 3.2629131772490434e-08, | |
| "loss": 0.1655, | |
| "step": 570 | |
| }, | |
| { | |
| "epoch": 2.62, | |
| "learning_rate": 2.3637940626713342e-08, | |
| "loss": 0.1975, | |
| "step": 585 | |
| }, | |
| { | |
| "epoch": 2.69, | |
| "learning_rate": 1.6033093909304853e-08, | |
| "loss": 0.1877, | |
| "step": 600 | |
| }, | |
| { | |
| "epoch": 2.76, | |
| "learning_rate": 9.861167167883044e-09, | |
| "loss": 0.1972, | |
| "step": 615 | |
| }, | |
| { | |
| "epoch": 2.83, | |
| "learning_rate": 5.1599600950022195e-09, | |
| "loss": 0.2058, | |
| "step": 630 | |
| }, | |
| { | |
| "epoch": 2.89, | |
| "learning_rate": 1.9582650256064203e-09, | |
| "loss": 0.1942, | |
| "step": 645 | |
| }, | |
| { | |
| "epoch": 2.96, | |
| "learning_rate": 2.75690599646522e-10, | |
| "loss": 0.1667, | |
| "step": 660 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "eval_loss": 0.1806206852197647, | |
| "eval_runtime": 84.9152, | |
| "eval_samples_per_second": 4.428, | |
| "eval_steps_per_second": 0.553, | |
| "step": 669 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "step": 669, | |
| "total_flos": 331458329182208.0, | |
| "train_loss": 0.3205718675180045, | |
| "train_runtime": 57740.8386, | |
| "train_samples_per_second": 0.37, | |
| "train_steps_per_second": 0.012 | |
| } | |
| ], | |
| "logging_steps": 15, | |
| "max_steps": 669, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 3, | |
| "save_steps": 500, | |
| "total_flos": 331458329182208.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |