InternLM

InternLM

1 min


InternLM

Github logo

InternLM is a base model with 100 billion parameters and multilingual capabilities. It was trained on more than a trillion tokens of data. It has a high level of knowledge and can perform well on tasks that require strong reasoning skills, such as reading comprehension and reasoning in Chinese and English. It also excels in various human-designed tests. Based on this, InternLM can use high-quality human-annotated dialogue data and techniques like RLHF to follow complex instructions in human conversations and generate responses that are ethical and aligned with human values.

InternLM-7B

InternLM Performance Evaluation

Developers used the open-source tool OpenCompass to assess InternLM’s capabilities in five areas: discipline, language, knowledge, inference, and comprehension. The following are some of the assessment outcomes, and you can see more on the OpenCompass leaderboard.

InternLM-7B

Model Zoo

The InternLM-trained programs InternLM 7B and InternLM 7B Chat have been made publicly available. Model weights are available for use in two different forms. For further pre-training or human preference alignment training, in addition to loading the models using the Transformers format, you may also directly input the weights using InternLM.

Model InternLM Format Weight Download Link Transformers Format Weight Download Link
InternLM 7B Open in OpenXLab 🤗internlm/intern-7b
InternLM Chat 7B Open in OpenXLab 🤗internlm/intern-chat-7b
InternLM Chat 7B 8k Open in OpenXLab 🤗internlm/intern-chat-7b-8k

Limitations

The model has been safely and ethically, but it may still generate bad content. Don’t spread it. We are not liable for any harm.

Import from Transformers

The following code snippet shows how to use Transformers to load the InternLM 7B Chat model:

    >> from transformers import AutoTokenizer, AutoModelForCausalLM
>> tokenizer = AutoTokenizer.from_pretrained("internlm/internlm-chat-7b", trust_remote_code=True)
>> model = AutoModelForCausalLM.from_pretrained("internlm/internlm-chat-7b", trust_remote_code=True).cuda()
>> model = model.eval()
>> response, history = model.chat(tokenizer, "hello", history=[])
>> print(response)
Hello! How can I help you today?
>> response, history = model.chat(tokenizer, "please provide three suggestions about time management", history=history)
>> print(response)
Sure, here are three tips for effective time management:

1. Prioritize tasks based on importance and urgency: Make a list of all your tasks and categorize them into "important and urgent," "important but not urgent," and "not important but urgent." Focus on completing the tasks in the first category before moving on to the others.
2. Use a calendar or planner: Write down deadlines and appointments in a calendar or planner so you don't forget them. This will also help you schedule your time more effectively and avoid overbooking yourself.
3. Minimize distractions: Try to eliminate any potential distractions when working on important tasks. Turn off notifications on your phone, close unnecessary tabs on your computer, and find a quiet place to work if possible.

Remember, good time management skills take practice and patience. Start with small steps and gradually incorporate these habits into your daily routine.

Dialogue

To use the frontend interface for the InternLM Chat 7B model, execute this code:

pip install streamlit==1.24.0
pip install transformers==4.30.2
streamlit run web_demo.py

InternLM Deployment

LMDeploy can be used to complete the one-click deployment of InternLM.

  1. First, install LMDeploy:
  python3 -m pip install lmdeploy
  1. For quick deployment, use the following command:
  python3 -m lmdeploy.serve.turbomind.deploy InternLM-7B /path/to/internlm-7b/model hf
  1. To interact with the model after deployment, launch a server with this command:
  python3 -m lmdeploy.serve.client {server_ip_addresss}:33337

To deploy InternLM, you can use LMDeploy, which offers a comprehensive workflow. See the deployment tutorial for further guidance on InternLM deployment.

Join Guidady AI Mail List

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.


Like it? Share with your friends!

0
40 shares

0 Comments

Your email address will not be published. Required fields are marked *

Belmechri

I am an IT engineer, content creator, and proud father with a passion for innovation and excellence. In both my personal and professional life, I strive for excellence and am committed to finding innovative solutions to complex problems.
Choose A Format
Personality quiz
Series of questions that intends to reveal something about the personality
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Poll
Voting to make decisions or determine opinions
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item
Meme
Upload your own images to make custom memes
Video
Youtube and Vimeo Embeds
Audio
Soundcloud or Mixcloud Embeds
Image
Photo or GIF
Gif
GIF format