Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use pepoo20/WordProblem with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pepoo20/WordProblem with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pepoo20/WordProblem") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pepoo20/WordProblem") model = AutoModelForCausalLM.from_pretrained("pepoo20/WordProblem", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pepoo20/WordProblem with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pepoo20/WordProblem" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pepoo20/WordProblem", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pepoo20/WordProblem
- SGLang
How to use pepoo20/WordProblem 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 "pepoo20/WordProblem" \ --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": "pepoo20/WordProblem", "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 "pepoo20/WordProblem" \ --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": "pepoo20/WordProblem", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pepoo20/WordProblem with Docker Model Runner:
docker model run hf.co/pepoo20/WordProblem
Model save
Browse files- README.md +66 -0
- generation_config.json +6 -0
- trainer_log.jsonl +1 -0
README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
base_model: MathSymbol/BasicSFT_1.8_Pretrain_Lightning
|
| 4 |
+
tags:
|
| 5 |
+
- llama-factory
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
model-index:
|
| 8 |
+
- name: WordProblem
|
| 9 |
+
results: []
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 13 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 14 |
+
|
| 15 |
+
# WordProblem
|
| 16 |
+
|
| 17 |
+
This model is a fine-tuned version of [MathSymbol/BasicSFT_1.8_Pretrain_Lightning](https://huggingface.co/MathSymbol/BasicSFT_1.8_Pretrain_Lightning) on an unknown dataset.
|
| 18 |
+
It achieves the following results on the evaluation set:
|
| 19 |
+
- Loss: 0.1677
|
| 20 |
+
|
| 21 |
+
## Model description
|
| 22 |
+
|
| 23 |
+
More information needed
|
| 24 |
+
|
| 25 |
+
## Intended uses & limitations
|
| 26 |
+
|
| 27 |
+
More information needed
|
| 28 |
+
|
| 29 |
+
## Training and evaluation data
|
| 30 |
+
|
| 31 |
+
More information needed
|
| 32 |
+
|
| 33 |
+
## Training procedure
|
| 34 |
+
|
| 35 |
+
### Training hyperparameters
|
| 36 |
+
|
| 37 |
+
The following hyperparameters were used during training:
|
| 38 |
+
- learning_rate: 5e-05
|
| 39 |
+
- train_batch_size: 4
|
| 40 |
+
- eval_batch_size: 4
|
| 41 |
+
- seed: 42
|
| 42 |
+
- gradient_accumulation_steps: 4
|
| 43 |
+
- total_train_batch_size: 16
|
| 44 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 45 |
+
- lr_scheduler_type: cosine
|
| 46 |
+
- lr_scheduler_warmup_steps: 500
|
| 47 |
+
- num_epochs: 1.0
|
| 48 |
+
|
| 49 |
+
### Training results
|
| 50 |
+
|
| 51 |
+
| Training Loss | Epoch | Step | Validation Loss |
|
| 52 |
+
|:-------------:|:------:|:----:|:---------------:|
|
| 53 |
+
| 0.1923 | 0.1645 | 1500 | 0.1849 |
|
| 54 |
+
| 0.176 | 0.3289 | 3000 | 0.1761 |
|
| 55 |
+
| 0.1736 | 0.4934 | 4500 | 0.1709 |
|
| 56 |
+
| 0.1688 | 0.6579 | 6000 | 0.1682 |
|
| 57 |
+
| 0.1689 | 0.8223 | 7500 | 0.1677 |
|
| 58 |
+
| 0.168 | 0.9868 | 9000 | 0.1677 |
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
### Framework versions
|
| 62 |
+
|
| 63 |
+
- Transformers 4.40.0
|
| 64 |
+
- Pytorch 2.2.1+cu121
|
| 65 |
+
- Datasets 2.17.1
|
| 66 |
+
- Tokenizers 0.19.1
|
generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"eos_token_id": 151643,
|
| 4 |
+
"max_new_tokens": 2048,
|
| 5 |
+
"transformers_version": "4.40.0"
|
| 6 |
+
}
|
trainer_log.jsonl
CHANGED
|
@@ -34,3 +34,4 @@
|
|
| 34 |
{"current_steps": 8700, "total_steps": 9120, "loss": 0.1741, "eval_loss": null, "predict_loss": null, "reward": null, "accuracy": null, "learning_rate": 2.923113370737779e-07, "epoch": 0.9539212192648228, "percentage": 95.39, "elapsed_time": "5:26:22", "remaining_time": "0:15:45"}
|
| 35 |
{"current_steps": 9000, "total_steps": 9120, "loss": 0.168, "eval_loss": null, "predict_loss": null, "reward": null, "accuracy": null, "learning_rate": 2.3904986054812396e-08, "epoch": 0.9868150544118857, "percentage": 98.68, "elapsed_time": "5:36:30", "remaining_time": "0:04:29"}
|
| 36 |
{"current_steps": 9000, "total_steps": 9120, "loss": null, "eval_loss": 0.1676628440618515, "predict_loss": null, "reward": null, "accuracy": null, "learning_rate": null, "epoch": 0.9868150544118857, "percentage": 98.68, "elapsed_time": "5:36:30", "remaining_time": "0:04:29"}
|
|
|
|
|
|
| 34 |
{"current_steps": 8700, "total_steps": 9120, "loss": 0.1741, "eval_loss": null, "predict_loss": null, "reward": null, "accuracy": null, "learning_rate": 2.923113370737779e-07, "epoch": 0.9539212192648228, "percentage": 95.39, "elapsed_time": "5:26:22", "remaining_time": "0:15:45"}
|
| 35 |
{"current_steps": 9000, "total_steps": 9120, "loss": 0.168, "eval_loss": null, "predict_loss": null, "reward": null, "accuracy": null, "learning_rate": 2.3904986054812396e-08, "epoch": 0.9868150544118857, "percentage": 98.68, "elapsed_time": "5:36:30", "remaining_time": "0:04:29"}
|
| 36 |
{"current_steps": 9000, "total_steps": 9120, "loss": null, "eval_loss": 0.1676628440618515, "predict_loss": null, "reward": null, "accuracy": null, "learning_rate": null, "epoch": 0.9868150544118857, "percentage": 98.68, "elapsed_time": "5:36:30", "remaining_time": "0:04:29"}
|
| 37 |
+
{"current_steps": 9120, "total_steps": 9120, "loss": null, "eval_loss": null, "predict_loss": null, "reward": null, "accuracy": null, "learning_rate": null, "epoch": 0.9999725884707108, "percentage": 100.0, "elapsed_time": "5:43:04", "remaining_time": "0:00:00"}
|