Text Generation
Transformers
Safetensors
English
qwen2
qwen
cot
chain_of_thought
qwen2.5
text-generation-inference
coco
conversational
Eval Results (legacy)
Instructions to use prithivMLmods/COCO-7B-Instruct-1M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/COCO-7B-Instruct-1M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/COCO-7B-Instruct-1M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/COCO-7B-Instruct-1M") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/COCO-7B-Instruct-1M") 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 prithivMLmods/COCO-7B-Instruct-1M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/COCO-7B-Instruct-1M" # 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/COCO-7B-Instruct-1M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/COCO-7B-Instruct-1M
- SGLang
How to use prithivMLmods/COCO-7B-Instruct-1M 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/COCO-7B-Instruct-1M" \ --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/COCO-7B-Instruct-1M", "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/COCO-7B-Instruct-1M" \ --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/COCO-7B-Instruct-1M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/COCO-7B-Instruct-1M with Docker Model Runner:
docker model run hf.co/prithivMLmods/COCO-7B-Instruct-1M
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ tags:
|
|
| 14 |
- text-generation-inference
|
| 15 |
- coco
|
| 16 |
---
|
| 17 |
-
# **COCO-7B-Instruct [chain of continuesness]**
|
| 18 |
|
| 19 |
COCO-7B-Instruct `[ chain of continuesness ]` is based on a 7B-parameter architecture, optimized for instruction-following tasks and advanced reasoning capabilities. Fine-tuned on a diverse set of datasets and leveraging chain-of-thought (CoT) reasoning, it excels in understanding contexts, solving mathematical problems, and generating detailed, structured responses. Its lightweight architecture ensures efficiency while maintaining performance, making it suitable for applications requiring logical reasoning, concise explanations, and multi-step problem-solving.
|
| 20 |
|
|
@@ -33,7 +33,7 @@ Below is a code snippet demonstrating how to load the tokenizer and model for co
|
|
| 33 |
```python
|
| 34 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 35 |
|
| 36 |
-
model_name = "prithivMLmods/COCO-7B-Instruct"
|
| 37 |
|
| 38 |
model = AutoModelForCausalLM.from_pretrained(
|
| 39 |
model_name,
|
|
|
|
| 14 |
- text-generation-inference
|
| 15 |
- coco
|
| 16 |
---
|
| 17 |
+
# **COCO-7B-Instruct 1M [chain of continuesness]**
|
| 18 |
|
| 19 |
COCO-7B-Instruct `[ chain of continuesness ]` is based on a 7B-parameter architecture, optimized for instruction-following tasks and advanced reasoning capabilities. Fine-tuned on a diverse set of datasets and leveraging chain-of-thought (CoT) reasoning, it excels in understanding contexts, solving mathematical problems, and generating detailed, structured responses. Its lightweight architecture ensures efficiency while maintaining performance, making it suitable for applications requiring logical reasoning, concise explanations, and multi-step problem-solving.
|
| 20 |
|
|
|
|
| 33 |
```python
|
| 34 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 35 |
|
| 36 |
+
model_name = "prithivMLmods/COCO-7B-Instruct-1M"
|
| 37 |
|
| 38 |
model = AutoModelForCausalLM.from_pretrained(
|
| 39 |
model_name,
|