Text Generation
Transformers
Safetensors
Japanese
English
qwen2
japanese
chat
sft
causal-lm
conversational
reasoning
fable
text-generation-inference
Instructions to use summerMC/matutake with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use summerMC/matutake with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="summerMC/matutake") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("summerMC/matutake") model = AutoModelForCausalLM.from_pretrained("summerMC/matutake") 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 summerMC/matutake with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "summerMC/matutake" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "summerMC/matutake", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/summerMC/matutake
- SGLang
How to use summerMC/matutake 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 "summerMC/matutake" \ --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": "summerMC/matutake", "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 "summerMC/matutake" \ --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": "summerMC/matutake", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use summerMC/matutake with Docker Model Runner:
docker model run hf.co/summerMC/matutake
File size: 3,331 Bytes
e22ea9a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | {
"best_global_step": null,
"best_metric": null,
"best_model_checkpoint": null,
"epoch": 1.0,
"eval_steps": 500,
"global_step": 199,
"is_hyper_param_search": false,
"is_local_process_zero": true,
"is_world_process_zero": true,
"log_history": [
{
"entropy": 0.9629484385251998,
"epoch": 0.10050251256281408,
"grad_norm": 4.09375,
"learning_rate": 1.9000000000000002e-06,
"loss": 0.9181639671325683,
"mean_token_accuracy": 0.8306790262460708,
"num_tokens": 40960.0,
"step": 20
},
{
"entropy": 0.9275371879339218,
"epoch": 0.20100502512562815,
"grad_norm": 4.28125,
"learning_rate": 3.900000000000001e-06,
"loss": 0.8665243148803711,
"mean_token_accuracy": 0.8379091203212738,
"num_tokens": 81920.0,
"step": 40
},
{
"entropy": 0.8652732700109482,
"epoch": 0.3015075376884422,
"grad_norm": 3.359375,
"learning_rate": 5.9e-06,
"loss": 0.7930655002593994,
"mean_token_accuracy": 0.8541035562753677,
"num_tokens": 122880.0,
"step": 60
},
{
"entropy": 0.780908739566803,
"epoch": 0.4020100502512563,
"grad_norm": 2.6875,
"learning_rate": 7.9e-06,
"loss": 0.7104530334472656,
"mean_token_accuracy": 0.8606008648872375,
"num_tokens": 163840.0,
"step": 80
},
{
"entropy": 0.598466919362545,
"epoch": 0.5025125628140703,
"grad_norm": 4.9375,
"learning_rate": 9.9e-06,
"loss": 0.5393049240112304,
"mean_token_accuracy": 0.8908646881580353,
"num_tokens": 204800.0,
"step": 100
},
{
"entropy": 0.40023221969604494,
"epoch": 0.6030150753768844,
"grad_norm": 2.734375,
"learning_rate": 9.118382907149164e-06,
"loss": 0.3737324237823486,
"mean_token_accuracy": 0.9215437412261963,
"num_tokens": 245760.0,
"step": 120
},
{
"entropy": 0.3805061921477318,
"epoch": 0.7035175879396985,
"grad_norm": 3.125,
"learning_rate": 6.635339816587109e-06,
"loss": 0.35905587673187256,
"mean_token_accuracy": 0.9224676638841629,
"num_tokens": 286652.0,
"step": 140
},
{
"entropy": 0.31945948526263235,
"epoch": 0.8040201005025126,
"grad_norm": 3.125,
"learning_rate": 3.5153981233586277e-06,
"loss": 0.29033424854278567,
"mean_token_accuracy": 0.935295569896698,
"num_tokens": 327612.0,
"step": 160
},
{
"entropy": 0.3433520093560219,
"epoch": 0.9045226130653267,
"grad_norm": 2.9375,
"learning_rate": 9.73648712344707e-07,
"loss": 0.32125253677368165,
"mean_token_accuracy": 0.930393049120903,
"num_tokens": 367708.0,
"step": 180
}
],
"logging_steps": 20,
"max_steps": 199,
"num_input_tokens_seen": 0,
"num_train_epochs": 1,
"save_steps": 1000,
"stateful_callbacks": {
"TrainerControl": {
"args": {
"should_epoch_stop": false,
"should_evaluate": false,
"should_log": false,
"should_save": true,
"should_training_stop": true
},
"attributes": {}
}
},
"total_flos": 3757085019549696.0,
"train_batch_size": 1,
"trial_name": null,
"trial_params": null
}
|