Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use MathMindsAGI/Test_context_pretrain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MathMindsAGI/Test_context_pretrain with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MathMindsAGI/Test_context_pretrain") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MathMindsAGI/Test_context_pretrain") model = AutoModelForCausalLM.from_pretrained("MathMindsAGI/Test_context_pretrain") 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
- vLLM
How to use MathMindsAGI/Test_context_pretrain with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MathMindsAGI/Test_context_pretrain" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MathMindsAGI/Test_context_pretrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MathMindsAGI/Test_context_pretrain
- SGLang
How to use MathMindsAGI/Test_context_pretrain 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 "MathMindsAGI/Test_context_pretrain" \ --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": "MathMindsAGI/Test_context_pretrain", "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 "MathMindsAGI/Test_context_pretrain" \ --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": "MathMindsAGI/Test_context_pretrain", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MathMindsAGI/Test_context_pretrain with Docker Model Runner:
docker model run hf.co/MathMindsAGI/Test_context_pretrain
| { | |
| "repo_id": "MathMindsAGI/Test_context_pretrain", | |
| "requested_repo_id": "MathMindsAGI/Test_context_pretrain", | |
| "model_export_dir": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt", | |
| "training_run_dir": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt", | |
| "results_dir": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/results/eval_difficulty", | |
| "uploaded_files": [ | |
| { | |
| "path_in_repo": "README.md", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/README.md", | |
| "size_bytes": 1318 | |
| }, | |
| { | |
| "path_in_repo": "config.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/config.json", | |
| "size_bytes": 691 | |
| }, | |
| { | |
| "path_in_repo": "generation_config.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/generation_config.json", | |
| "size_bytes": 133 | |
| }, | |
| { | |
| "path_in_repo": "model.safetensors", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/model.safetensors", | |
| "size_bytes": 412699256 | |
| }, | |
| { | |
| "path_in_repo": "special_tokens_map.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/special_tokens_map.json", | |
| "size_bytes": 699 | |
| }, | |
| { | |
| "path_in_repo": "tokenizer.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/tokenizer.json", | |
| "size_bytes": 132794 | |
| }, | |
| { | |
| "path_in_repo": "tokenizer_config.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/tokenizer_config.json", | |
| "size_bytes": 3143 | |
| }, | |
| { | |
| "path_in_repo": "chat_template.jinja", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/chat_template.jinja", | |
| "size_bytes": 443 | |
| }, | |
| { | |
| "path_in_repo": "artifacts/training/all_results.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/all_results.json", | |
| "size_bytes": 211 | |
| }, | |
| { | |
| "path_in_repo": "artifacts/training/train_results.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/train_results.json", | |
| "size_bytes": 211 | |
| }, | |
| { | |
| "path_in_repo": "artifacts/training/trainer_log.jsonl", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/trainer_log.jsonl", | |
| "size_bytes": 385767 | |
| }, | |
| { | |
| "path_in_repo": "artifacts/training/trainer_state.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/trainer_state.json", | |
| "size_bytes": 330574 | |
| }, | |
| { | |
| "path_in_repo": "artifacts/training/training_args.bin", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/training_args.bin", | |
| "size_bytes": 6353 | |
| }, | |
| { | |
| "path_in_repo": "artifacts/training/training_loss.png", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/saves/composition-10B/op_level/id2-10_0.25easy_0.25medium_0.5hard/pt/training_loss.png", | |
| "size_bytes": 28679 | |
| }, | |
| { | |
| "path_in_repo": "artifacts/training/scripts/run_pretrain_id2-10_0.25easy_0.25medium_0.5hard.sh", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/scripts/composition/op-difficulty-10B/script_pt/run_pretrain_id2-10_0.25easy_0.25medium_0.5hard.sh", | |
| "size_bytes": 2320 | |
| }, | |
| { | |
| "path_in_repo": "artifacts/training/scripts/run.sh", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/run.sh", | |
| "size_bytes": 754 | |
| }, | |
| { | |
| "path_in_repo": "results/eval_difficulty/checkpoint-18779_id_generations.jsonl", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/results/eval_difficulty/checkpoint-18779_id_generations.jsonl", | |
| "size_bytes": 1790663092 | |
| }, | |
| { | |
| "path_in_repo": "results/eval_difficulty/checkpoint-18779_metrics.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/results/eval_difficulty/checkpoint-18779_metrics.json", | |
| "size_bytes": 66147 | |
| }, | |
| { | |
| "path_in_repo": "results/eval_difficulty/checkpoint-18779_ood_generations.jsonl", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/results/eval_difficulty/checkpoint-18779_ood_generations.jsonl", | |
| "size_bytes": 2445405195 | |
| }, | |
| { | |
| "path_in_repo": "results/eval_difficulty/summary.csv", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/results/eval_difficulty/summary.csv", | |
| "size_bytes": 322 | |
| }, | |
| { | |
| "path_in_repo": "results/eval_difficulty/summary.json", | |
| "source_path": "/network/scratch/k/kamran.chitsaz/Interplay-LM-Reasoning/results/eval_difficulty/summary.json", | |
| "size_bytes": 22961 | |
| } | |
| ] | |
| } |