Text Generation
Transformers
Safetensors
English
qwen2
crca
causal-reasoning
1.5b
finetuned
conversational
text-generation-inference
Instructions to use Euroswarms/CR-CA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Euroswarms/CR-CA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Euroswarms/CR-CA") 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("Euroswarms/CR-CA") model = AutoModelForCausalLM.from_pretrained("Euroswarms/CR-CA", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Euroswarms/CR-CA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Euroswarms/CR-CA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Euroswarms/CR-CA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Euroswarms/CR-CA
- SGLang
How to use Euroswarms/CR-CA 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 "Euroswarms/CR-CA" \ --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": "Euroswarms/CR-CA", "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 "Euroswarms/CR-CA" \ --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": "Euroswarms/CR-CA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Euroswarms/CR-CA with Docker Model Runner:
docker model run hf.co/Euroswarms/CR-CA
update
Browse files
README.md
CHANGED
|
@@ -1,3 +1,54 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: other
|
| 5 |
+
base_model: Qwen/Qwen2.5-1.5B-Instruct
|
| 6 |
+
library_name: transformers
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- crca
|
| 10 |
+
- causal-reasoning
|
| 11 |
+
- qwen2
|
| 12 |
+
- 1.5b
|
| 13 |
+
- finetuned
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# CRCA 1.5B Full Finetune
|
| 17 |
+
|
| 18 |
+
## Overview
|
| 19 |
+
CRCA reasoning-optimized 1.5B causal language model, based on the Qwen2 architecture
|
| 20 |
+
(`Qwen2ForCausalLM`). This model is intended for causal reasoning, counterfactual
|
| 21 |
+
analysis, and CRCA-style structured tasks.
|
| 22 |
+
|
| 23 |
+
## Model Details
|
| 24 |
+
- **Model type:** `qwen2`
|
| 25 |
+
- **Architecture:** `Qwen2ForCausalLM`
|
| 26 |
+
- **Hidden size:** `1536`
|
| 27 |
+
- **Layers:** `28`
|
| 28 |
+
- **Attention heads:** `12` (KV heads: `2`)
|
| 29 |
+
- **Max position embeddings:** `32768`
|
| 30 |
+
- **Vocab size:** `151936`
|
| 31 |
+
- **Dtype:** `float16`
|
| 32 |
+
|
| 33 |
+
## Training Summary
|
| 34 |
+
This model was produced via full finetuning for CRCA reasoning. Training metadata
|
| 35 |
+
is stored in `training_args.bin`.
|
| 36 |
+
|
| 37 |
+
## Intended Use
|
| 38 |
+
For causal reasoning, counterfactual analysis, and structured CRCA reasoning prompts.
|
| 39 |
+
|
| 40 |
+
## Generation Settings
|
| 41 |
+
Default generation parameters are stored in `generation_config.json`:
|
| 42 |
+
- `do_sample`: `true`
|
| 43 |
+
- `temperature`: `0.7`
|
| 44 |
+
- `top_p`: `0.8`
|
| 45 |
+
- `top_k`: `20`
|
| 46 |
+
- `repetition_penalty`: `1.1`
|
| 47 |
+
|
| 48 |
+
## Limitations
|
| 49 |
+
- Outputs should be validated for factual correctness.
|
| 50 |
+
- The model may hallucinate causal claims without evidence.
|
| 51 |
+
|
| 52 |
+
## License
|
| 53 |
+
Follow the base model and dataset licenses used for training. Add your explicit
|
| 54 |
+
license here if required.
|