naver / cocom-v1-128-mistral-7b

huggingface.co
Total runs: 28
24-hour runs: 1
7-day runs: 6
30-day runs: 12
Model's Last Updated: October 23 2024
feature-extraction

Introduction of cocom-v1-128-mistral-7b

Model Details of cocom-v1-128-mistral-7b

Summary

COCOM is an effective context compression method, reducing long contexts to only a handful of Context Embeddings speeding up the generation time for Question Answering

COCOM pipeline

Context Embeddings for Efficient Answer Generation in RAG

Retrieval-Augmented Generation (RAG) allows overcoming the limited knowledge of LLMs by extending the input with external context. A major drawback in RAG is the considerable increase in decoding time with longer inputs. We address this challenge by presenting COCOM , an effective context compression method, reducing long contexts to only a handful of Context Embeddings speeding up the generation time. Our method allows for different compression rates trading off decoding time for answer quality. Compared to earlier methods, COCOM allows for handling multiple contexts more effectively, significantly reducing decoding time for long inputs. Our method demonstrates a speed-up of up to 5.69 times while achieving higher performance compared to existing efficient context compression methods.

Model Inference

For batch processing, the model takes as input

  • questions ( list ): A list containing questions
  • contexts ( list of lists ). For each question a list of contexts, where the number of contexts is fixed throughout questions. The models have been fine-tuned (and should be inferenced) with 5 contexts.

The model compresses the questions into context embeddings and answers the question based on the provided context embeddings.

from transformers import AutoModelForCausalLM

model = AutoModel.from_pretrained('naver/cocom-v1-128-mistral-7b', trust_remote_code=True)
model = model.to('cuda')
contexts = [[
  'Rosalind Bailey. Rosalind Bailey Rosalind Bailey (born 1946) is a British actress, known for her portrayal of Sarah Headley ("née" Lytton) in the 1970s and 1980s BBC television drama “When the Boat Comes In". Bailey has appeared in numerous British television drama series, including "Byker Grove", “Distant Shores" and "Burn Up". Her stage work includes playing Miss Mary Shepherd in Alan Bennett’s play "The Lady in the Van”.',
  'Malcolm Terris. Malcolm Terris Malcolm Terris (born 11 January 1941 in Sunderland, County Durham) is a British actor. He had a lengthy career in a large number of television programmes. Possibly his best-known role was in "When the Boat Comes In", a popular 1970s series, where he played the part of Matt Headley. His film career includes appearances in "The First Great Train Robbery" (1978), "McVicar" (1980), "The Plague Dogs" (1982, voice only), "Slayground" (1983), “The Bounty" (1984) as Thomas Huggan, ship’s surgeon, "Mata Hari" (1985), "Revolution" (1985), “Scandal" (1989), and “Chaplin” (1992). His TV appearances include: One episode of',
  'When the Boat Comes In. When the Boat Comes In When the Boat Comes In is a British television period drama produced by the BBC between 1976 and 1981. The series stars James Bolam as Jack Ford, a First World War veteran who returns to his poverty-stricken (fictional) town of Gallowshield in the North East of England. The series dramatises the political struggles of the 1920s and 1930s and explores the impact of national and international politics upon Ford and the people around him. Section:Production. The majority of episodes were written by creator James Mitchell, but in Series 1 north-eastern',
  'Susie Youssef. Youssef began her comedy career as a writer for "The Ronnie Johns Half Hour" in 2006, and made her acting debut in the short film "Clicked" in the role of Lina in 2011. In 2014, she played Jane in the short film "Kevin Needs to Make New Friends: Because Everyone Hates Him for Some Reason" and then turned to television where she appeared in "The Chaser’s Media Circus". In 2014, Youssef played the lead role of Sarah in the Hayloft Project’s stage play "The Boat People" which won the Best On Stage award at the FBi SMAC Awards',
  'Madelaine Newton. Madelaine Newton Madelaine Newton is a British actress best known for her portrayal of Dolly in 1970s BBC television drama "When the Boat Comes In". She is married to actor Kevin Whately, known for his role as Robert "Robbie" Lewis in both "Inspector Morse” and its spin-off "Lewis". They have two children. She starred alongside her husband in the “Inspector Morse" episode "Masonic Mysteries" as Beryl Newsome - the love-interest of Morse - whom Morse was wrongly suspected of murdering. She played Whately’s on-screen wife in the 1988 Look and Read children’s serial, Geordie Racer. She also made'
  ]]
questions = ['who played sarah hedley in when the boat comes in?']

answers = model.generate_from_text(contexts=contexts, questions=questions, max_new_tokens=128)

print(answers)

References:

Paper : https://arxiv.org/pdf/2407.09252

@misc{rau2024contextembeddingsefficientanswer,
      title={Context Embeddings for Efficient Answer Generation in RAG}, 
      author={David Rau and Shuai Wang and Hervé Déjean and Stéphane Clinchant},
      year={2024},
      eprint={2407.09252},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2407.09252}, 
}

Runs of naver cocom-v1-128-mistral-7b on huggingface.co

28
Total runs
1
24-hour runs
2
3-day runs
6
7-day runs
12
30-day runs

More Information About cocom-v1-128-mistral-7b huggingface.co Model

cocom-v1-128-mistral-7b huggingface.co

cocom-v1-128-mistral-7b huggingface.co is an AI model on huggingface.co that provides cocom-v1-128-mistral-7b's model effect (), which can be used instantly with this naver cocom-v1-128-mistral-7b model. huggingface.co supports a free trial of the cocom-v1-128-mistral-7b model, and also provides paid use of the cocom-v1-128-mistral-7b. Support call cocom-v1-128-mistral-7b model through api, including Node.js, Python, http.

cocom-v1-128-mistral-7b huggingface.co Url

https://huggingface.co/naver/cocom-v1-128-mistral-7b

naver cocom-v1-128-mistral-7b online free

cocom-v1-128-mistral-7b huggingface.co is an online trial and call api platform, which integrates cocom-v1-128-mistral-7b's modeling effects, including api services, and provides a free online trial of cocom-v1-128-mistral-7b, you can try cocom-v1-128-mistral-7b online for free by clicking the link below.

naver cocom-v1-128-mistral-7b online free url in huggingface.co:

https://huggingface.co/naver/cocom-v1-128-mistral-7b

cocom-v1-128-mistral-7b install

cocom-v1-128-mistral-7b is an open source model from GitHub that offers a free installation service, and any user can find cocom-v1-128-mistral-7b on GitHub to install. At the same time, huggingface.co provides the effect of cocom-v1-128-mistral-7b install, users can directly use cocom-v1-128-mistral-7b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

cocom-v1-128-mistral-7b install url in huggingface.co:

https://huggingface.co/naver/cocom-v1-128-mistral-7b

Url of cocom-v1-128-mistral-7b

cocom-v1-128-mistral-7b huggingface.co Url

Provider of cocom-v1-128-mistral-7b huggingface.co

naver
ORGANIZATIONS

Other API from naver

huggingface.co

Total runs: 102.6K
Run Growth: -2.3K
Growth Rate: -2.24%
Updated:June 30 2025
huggingface.co

Total runs: 399
Run Growth: -84
Growth Rate: -21.05%
Updated:June 30 2025
huggingface.co

Total runs: 215
Run Growth: 50
Growth Rate: 23.26%
Updated:June 30 2025
huggingface.co

Total runs: 115
Run Growth: 76
Growth Rate: 66.09%
Updated:March 17 2025
huggingface.co

Total runs: 67
Run Growth: -6
Growth Rate: -8.96%
Updated:September 26 2025
huggingface.co

Total runs: 8
Run Growth: 1
Growth Rate: 12.50%
Updated:March 13 2025
huggingface.co

Total runs: 3
Run Growth: 0
Growth Rate: 0.00%
Updated:March 13 2025