Text Generation
Transformers
Safetensors
English
qwen2
Corpus
Qwen
trl
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use prithivMLmods/Megatron-Corpus-14B-Exp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Megatron-Corpus-14B-Exp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Megatron-Corpus-14B-Exp") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Megatron-Corpus-14B-Exp") model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Megatron-Corpus-14B-Exp", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prithivMLmods/Megatron-Corpus-14B-Exp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Megatron-Corpus-14B-Exp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Megatron-Corpus-14B-Exp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/Megatron-Corpus-14B-Exp
- SGLang
How to use prithivMLmods/Megatron-Corpus-14B-Exp 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 "prithivMLmods/Megatron-Corpus-14B-Exp" \ --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": "prithivMLmods/Megatron-Corpus-14B-Exp", "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 "prithivMLmods/Megatron-Corpus-14B-Exp" \ --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": "prithivMLmods/Megatron-Corpus-14B-Exp", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/Megatron-Corpus-14B-Exp with Docker Model Runner:
docker model run hf.co/prithivMLmods/Megatron-Corpus-14B-Exp
Commit History
-
Adding Evaluation Results (#2)
Verified signature- Adding Evaluation Results (8cdbd55bee61cd83488cac6e84ffdc8a314159eb)2fb2850
-
Delete pytorch_model.bin.index.json
Verified signature1d1f238 -
Delete pytorch_model-00005-of-00006.bin
Verified signature6effcda -
Delete pytorch_model-00004-of-00006.bin
Verified signature2c30685 -
Delete pytorch_model-00003-of-00006.bin
Verified signatureadfacba -
Delete pytorch_model-00006-of-00006.bin
Verified signature6126c55 -
Delete pytorch_model-00002-of-00006.bin
Verified signaturea1acfa0 -
Delete pytorch_model-00001-of-00006.bin
Verified signaturef8fbd79 -
Adding `safetensors` variant of this model (#1)
Verified signature- Adding `safetensors` variant of this model (6fa11122b169975f337b3917af1911ae86af207d) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>b1c13b1
-
Update README.md
Verified signature3e63932 -
Add files using upload-large-folder tool
Verified signature8f99717 -
Update README.md
Verified signatured12fd86 -
Update README.md
Verified signature5cf5cc8 -
Update README.md
Verified signature9715b43 -
initial commit
Verified signaturebf39ec4