Giới thiệu Cogito v2.1
Mô tả ngắn gọn
- 6 min read
Giới thiệu Cogito v2.1
Chúng tôi xin ra mắt Cogito v2.1, mô hình ngôn ngữ lớn (LLM) mã nguồn mở tốt nhất từ một công ty tại Hoa Kỳ.
Điểm nổi bật
- Cogito v2.1 671B: Chúng tôi đã phát hành mô hình Cogito v2.1 với 671 tỷ tham số, là mô hình mã nguồn mở tốt nhất hiện nay từ một công ty của Mỹ.
- Hiệu suất cạnh tranh: Trên hầu hết các bài kiểm tra tiêu chuẩn ngành và đánh giá nội bộ của chúng tôi, mô hình này thể hiện hiệu suất cạnh tranh với các mô hình đóng và mở tiên tiến, đồng thời vượt trội so với bất kỳ mô hình mã nguồn mở nào khác của Mỹ.
- Trải nghiệm tương tác: Chúng tôi đã xây dựng một giao diện cho phép bạn thử nghiệm mô hình tại chat.deepcogito.com. Dịch vụ này miễn phí và chúng tôi không lưu trữ bất kỳ cuộc trò chuyện nào.
- Hiệu quả về token: Mô hình này sử dụng ít token hơn đáng kể so với các mô hình có khả năng tương tự nhờ khả năng suy luận vượt trội. Ngoài ra, nó còn được cải thiện về khả năng tuân theo chỉ dẫn, lập trình, xử lý các truy vấn dài, hội thoại đa lượt và tính sáng tạo.
Chi tiết phát hành
Các trọng số mô hình1 hiện đã có trên Huggingface.
Mô hình cũng có sẵn dưới dạng API trên OpenRouter, Fireworks AI, Together AI, đám mây Ollama, Baseten và RunPod. Bạn cũng có thể chạy mô hình cục bộ bằng Ollama hoặc Unsloth.
Đánh giá
Chúng tôi đã thêm các bài đánh giá trên một vài tiêu chuẩn phổ biến.
(Lưu ý: Mặc dù các tiêu chuẩn này cung cấp một tín hiệu hữu ích, chúng không phản ánh đầy đủ hiệu suất thực tế. Tuy nhiên, các mô hình của chúng tôi đã được thử nghiệm qua nhiều đánh giá nội bộ và bên ngoài và luôn cho kết quả tốt.
Cuối cùng, những đánh giá tốt nhất là những đánh giá gần gũi nhất với nhu cầu của người dùng. Chúng tôi khuyến khích người dùng tự mình thử nghiệm các mô hình trên giao diện trò chuyện.
Chúng tôi tin tưởng rằng các mô hình của chúng tôi sẽ đáp ứng các tiêu chuẩn thực tế như vậy và mang lại kết quả mạnh mẽ trong thực tế.)

Các đánh giá và thiết lập của chúng2 được giữ chung cho nhiều mô hình.

Các mô hình Cogito được huấn luyện thông qua giám sát quy trình cho các chuỗi suy luận. Do đó, mô hình phát triển trực giác mạnh mẽ hơn về quỹ đạo tìm kiếm phù hợp trong quá trình suy luận và không cần các chuỗi suy luận dài để đi đến câu trả lời đúng.
Mô hình Cogito v2.1 sử dụng số lượng token trung bình thấp nhất3 so với các mô hình suy luận có khả năng tương tự.

Sử dụng
Cogito v2.1 là mô hình Mixture of Experts (MoE) với 671 tỷ tham số ở định dạng BF16, tiêu tốn khoảng 1.3 TB cho các tham số. Bạn sẽ cần ít nhất 8 B200 (1 node) hoặc 16 H200 (2 node) để chạy mô hình này. Để triển khai trên 8 H200, hãy sử dụng phiên bản lượng tử hóa: deepcogito/cogito-671b-v2.1-FP8.
Với pipeline HuggingFace
python import torch from transformers import pipeline
model_id = “deepcogito/cogito-671b-v2.1” pipe = pipeline(“text-generation”, model=model_id, model_kwargs={“dtype”: “auto”}, device_map=“auto”)
messages = [ {“role”: “system”, “content”: “Always respond in 1-2 words.”}, {“role”: “user”, “content”: “Who created you?”}, ]
without reasoning
outputs = pipe(messages, max_new_tokens=512, tokenizer_encode_kwargs={“enable_thinking”: False}) print(outputs[0][“generated_text”][-1])
{‘role’: ‘assistant’, ‘content’: ‘Deep Cogito’}
with reasoning
outputs = pipe(messages, max_new_tokens=512, tokenizer_encode_kwargs={“enable_thinking”: True}) print(outputs[0][“generated_text”][-1])
{‘role’: ‘assistant’, ‘content’: ‘The question is asking about my creator. I know that I'm Cogito, an AI assistant created by Deep Cogito, which is an AI research lab. The question is very direct and can be answered very briefly. Since the user has specified to always respond in 1-2 words, I should keep my answer extremely concise.
The most accurate 2-word answer would be “Deep Cogito” - this names the organization that created me without any unnecessary details. “Deep Cogito” is two words, so it fits the requirement perfectly.
Deep Cogito’}
Với HuggingFace AutoModel
python from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = “deepcogito/cogito-671b-v2.1”
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=“auto”, device_map=“auto”) tokenizer = AutoTokenizer.from_pretrained(model_name)
messages = [ {“role”: “system”, “content”: “Always respond in 1-2 words.”}, {“role”: “user”, “content”: “Who created you?”} ]
text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, enable_thinking=False, )
To enable reasoning, set enable_thinking=True above.
model_inputs = tokenizer([text], return_tensors=“pt”).to(model.device)
generated_ids = model.generate(**model_inputs, max_new_tokens=512) generated_ids = [ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids) ] response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0] print(response)
Với vLLM
python from transformers import AutoTokenizer from vllm import SamplingParams, LLM
model_id = “deepcogito/cogito-671b-v2.1-FP8” tokenizer = AutoTokenizer.from_pretrained(model_id) llm = LLM(model=model_id, tensor_parallel_size=8, gpu_memory_utilization=0.95, max_model_len=16384) sampling_params = SamplingParams(temperature=0.6, max_tokens=8192)
prompts = [“who created you?”, “how are you doing?”]
prompts = [ tokenizer.apply_chat_template( [{“role”: “system”, “content”: “Always respond in 1-2 words.”}, {“role”: “user”, “content”: prompt}], tokenize=False, add_generation_prompt=True, enable_thinking=False, ) for prompt in prompts ]
To enable reasoning, set enable_thinking=True above.
out = llm.generate(prompts, sampling_params=sampling_params) print([res.outputs[0].text for res in out])
Với SGLang
Bắt đầu endpoint cục bộ với:
bash
H200s
python3 -m sglang.launch_server –model deepcogito/cogito-671b-v2.1-FP8 –tp 8
B200s
python3 -m sglang.launch_server –model deepcogito/cogito-671b-v2.1-FP8 –tp 8 –quantization compressed-tensors –moe-runner-backend triton
Sau đó truy vấn mô hình:
python import openai client = openai.Client(base_url=“http://127.0.0.1:30000/v1”, api_key=“EMPTY”)
response = client.chat.completions.create( model=“default”, messages=[ {“role”: “system”, “content”: “Always respond in 1-2 words.”}, {“role”: “user”, “content”: “Who created you?”}, ], temperature=0.6, max_tokens=8192, extra_body = {“chat_template_kwargs”: {“enable_thinking”: False}} )
To enable reasoning, set enable_thinking=True above.
print(response.choices[0].message.content)
1 Tương tự như Cogito v2, chúng tôi đã lấy mô hình cơ sở Deepseek được cấp phép mở từ tháng 11 năm 2024 và thực hiện hậu đào tạo nội bộ cho Cogito v2.1. 2 Đối với SWE-Bench, chúng tôi đã sử dụng framework Agentless làm điều phối để thực hiện định vị sửa lỗi mã trong kho lưu trữ của mỗi phiên bản và tạo bản vá. Mô hình OpenAI’s text-embedding-3-small được sử dụng trong bước RAG. Các số liệu được trình bày là Single Patch without Test (accuracy), với số lượng token đầu ra tối đa cho mỗi lệnh gọi mô hình được đặt là 16384 (ngoại trừ Qwen3-VL 235B, được đặt là 32768, vì nếu không thì việc so sánh đánh giá sẽ không sử dụng được do vi phạm độ dài phản hồi thường xuyên). Các loại số liệu: ‘accuracy’ cho các bài kiểm tra không liên quan đến mã (AIME, GPQA Diamond, MATH-500, MMLU-Pro, HLE, MMMLU), ‘f1’ cho SimpleQA Verified. Số lần lặp lại mỗi ví dụ: AIME (32), GPQA Diamond (8), MATH-500 (3), MMLU-Pro (1), HLE (1), SimpleQA Verified (1), MMMLU (1). 3 Đồ thị hiển thị số lượng token trung bình được sử dụng cho mỗi phiên bản bài kiểm tra, trung bình trên tất cả các bài kiểm tra.
Link bài viết gốc
- Tags:
- Ai
- 4 Days Ago
- Huggingface.co