Text Generation
Transformers
Safetensors
English
qwen2
qwen
Calcium
Opus
14B
qwq
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use prithivMLmods/Calcium-Opus-14B-Elite4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Calcium-Opus-14B-Elite4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Calcium-Opus-14B-Elite4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Calcium-Opus-14B-Elite4") model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Calcium-Opus-14B-Elite4", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prithivMLmods/Calcium-Opus-14B-Elite4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Calcium-Opus-14B-Elite4" # 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/Calcium-Opus-14B-Elite4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/Calcium-Opus-14B-Elite4
- SGLang
How to use prithivMLmods/Calcium-Opus-14B-Elite4 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/Calcium-Opus-14B-Elite4" \ --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/Calcium-Opus-14B-Elite4", "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/Calcium-Opus-14B-Elite4" \ --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/Calcium-Opus-14B-Elite4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/Calcium-Opus-14B-Elite4 with Docker Model Runner:
docker model run hf.co/prithivMLmods/Calcium-Opus-14B-Elite4
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,4 +11,93 @@ tags:
|
|
| 11 |
- Calcium
|
| 12 |
- Opus
|
| 13 |
- 14B
|
| 14 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
- Calcium
|
| 12 |
- Opus
|
| 13 |
- 14B
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+

|
| 17 |
+
|
| 18 |
+
# **Calcium-Opus-14B-Elite4**
|
| 19 |
+
|
| 20 |
+
Calcium-Opus-14B-Elite4 is based on the Qwen 2.5 14B modality architecture, designed to enhance the reasoning capabilities of 14B-parameter models. These models have proven effective in context understanding, reasoning, and mathematical problem-solving. It has been fine-tuned using a long chain-of-thought reasoning model and specialized datasets, with a focus on chain-of-thought (CoT) reasoning for problem-solving. This model is optimized for tasks requiring logical reasoning, detailed explanations, and multi-step problem-solving, making it ideal for applications such as instruction-following, text generation, and complex reasoning tasks.
|
| 21 |
+
|
| 22 |
+
Key improvements include:
|
| 23 |
+
1. **Enhanced Knowledge and Expertise**: The model demonstrates significantly more knowledge and greatly improved capabilities in coding and mathematics, thanks to specialized expert models in these domains.
|
| 24 |
+
2. **Improved Instruction Following**: It shows significant advancements in following instructions, generating long texts (over 8K tokens), understanding structured data (e.g., tables), and producing structured outputs, especially in JSON format.
|
| 25 |
+
3. **Better Adaptability**: The model is more resilient to diverse system prompts, enabling enhanced role-playing implementations and condition-setting for chatbots.
|
| 26 |
+
4. **Long-Context Support**: It offers long-context support of up to 128K tokens and can generate up to 8K tokens in a single output.
|
| 27 |
+
5. **Multilingual Proficiency**: The model supports over 29 languages, including Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
|
| 28 |
+
|
| 29 |
+
# **Quickstart with transformers**
|
| 30 |
+
|
| 31 |
+
Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 35 |
+
|
| 36 |
+
model_name = "prithivMLmods/Calcium-Opus-14B-Elite4"
|
| 37 |
+
|
| 38 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 39 |
+
model_name,
|
| 40 |
+
torch_dtype="auto",
|
| 41 |
+
device_map="auto"
|
| 42 |
+
)
|
| 43 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 44 |
+
|
| 45 |
+
prompt = "Give me a short introduction to large language model."
|
| 46 |
+
messages = [
|
| 47 |
+
{"role": "system", "content": "You are Qwen, created by Alibaba Cloud. You are a helpful assistant."},
|
| 48 |
+
{"role": "user", "content": prompt}
|
| 49 |
+
]
|
| 50 |
+
text = tokenizer.apply_chat_template(
|
| 51 |
+
messages,
|
| 52 |
+
tokenize=False,
|
| 53 |
+
add_generation_prompt=True
|
| 54 |
+
)
|
| 55 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 56 |
+
|
| 57 |
+
generated_ids = model.generate(
|
| 58 |
+
**model_inputs,
|
| 59 |
+
max_new_tokens=512
|
| 60 |
+
)
|
| 61 |
+
generated_ids = [
|
| 62 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 63 |
+
]
|
| 64 |
+
|
| 65 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 66 |
+
```
|
| 67 |
+
# **Intended Use**
|
| 68 |
+
1. **Reasoning and Context Understanding**:
|
| 69 |
+
Designed to assist with complex reasoning tasks, contextual understanding, and solving problems requiring logical deduction and critical thinking.
|
| 70 |
+
|
| 71 |
+
2. **Mathematical Problem-Solving**:
|
| 72 |
+
Specialized for performing advanced mathematical reasoning and calculations, making it suitable for educational, scientific, and research-oriented applications.
|
| 73 |
+
|
| 74 |
+
3. **Code Generation and Debugging**:
|
| 75 |
+
Offers robust support for coding tasks, including writing, debugging, and optimizing code in various programming languages, ideal for developers and software engineers.
|
| 76 |
+
|
| 77 |
+
4. **Structured Data Analysis**:
|
| 78 |
+
Excels in processing and analyzing structured data, such as tables and JSON, and generating structured outputs, which is useful for data analysts and automation workflows.
|
| 79 |
+
|
| 80 |
+
5. **Multilingual Applications**:
|
| 81 |
+
Supports over 29 languages, making it versatile for global applications like multilingual chatbots, content generation, and translations.
|
| 82 |
+
|
| 83 |
+
6. **Extended Content Generation**:
|
| 84 |
+
Capable of generating long-form content (over 8K tokens), useful for writing reports, articles, and creating detailed instructional guides.
|
| 85 |
+
|
| 86 |
+
# **Limitations**
|
| 87 |
+
1. **Hardware Requirements**:
|
| 88 |
+
Due to its 20B parameter size and support for long-context inputs, running the model requires significant computational resources, including high-memory GPUs or TPUs.
|
| 89 |
+
|
| 90 |
+
2. **Potential Bias in Multilingual Outputs**:
|
| 91 |
+
While it supports 29 languages, the quality and accuracy of outputs may vary depending on the language, especially for less-resourced languages.
|
| 92 |
+
|
| 93 |
+
3. **Inconsistent Outputs for Creative Tasks**:
|
| 94 |
+
The model may occasionally produce inconsistent or repetitive results in creative writing, storytelling, or highly subjective tasks.
|
| 95 |
+
|
| 96 |
+
4. **Limited Real-World Awareness**:
|
| 97 |
+
It lacks real-time knowledge of current events beyond its training cutoff, which may limit its ability to respond accurately to the latest information.
|
| 98 |
+
|
| 99 |
+
5. **Error Propagation in Long-Text Outputs**:
|
| 100 |
+
In generating long texts, minor errors in early outputs can sometimes propagate, reducing the overall coherence and accuracy of the response.
|
| 101 |
+
|
| 102 |
+
6. **Dependency on High-Quality Prompts**:
|
| 103 |
+
Performance may depend on the quality and specificity of the input prompt, requiring users to carefully design queries for optimal results.
|