ホームページ >テクノロジー周辺機器 >AI >Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」

Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」

Lisa Kudrow
Lisa Kudrowオリジナル
2025-03-04 09:48:11327ブラウズ

Grokは、Elon Muskによって設立された人工知能会社であるXaiが開発した高度なAIモデルです。多くの主流の言語モデルとは異なり、GrokはChatGpt(Openai)またはClaude(人類による)と比較して、より制限が少なく、その応答がよりオープンになるように設計されています。これは、公平で真実を求めるAI体験を提供することを目的としており、今日利用可能な最も強力で独特の大規模な言語モデル(LLM)の1つになります。 Grok 2などのGrokモデルを使用すると、ビジョン機能、テキストからテキストなどを探索できます。 Grok 2は、その前任者と同様に、動的な会話に従事し、複雑な質問に答え、創造的なコンテンツを生成しながら、論理的および事実に基づいたアプローチを維持するように訓練されています。

目次

  • grok by elon musk
  • grok-2?
  • grokのイメージ生成についての真実
  • grok 3のリリース:なぜこれがすべて変化するのか
  • 画像の理解:ビジョンモデル
  • grok 2 langchainを使用
  • チャットボットを作成しましょう
  • 結論
  • エロン・マスクによるグロックの家族

これが進化:

です

Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」

    grok-1
  • :2023年11月に発売されたこの最初のバージョンは、Grokの会話能力の基礎を築きました。これは、トレーニングが限られているが、急速な改善の可能性がある「非常に初期のベータ製品」と呼ばれていました。 GROK-1.5
  • :2024年5月にリリースされたこのアップデートは、推論機能を強化し、コンテキストの長さを128,000トークンに増やし、より複雑な相互作用を可能にしました。
  • grok-1.5v:2024年4月に発表されたこのバージョンは、ドキュメントや画像などのさまざまな視覚情報タイプを処理する機能を追加しました。
  • grok-2 :2024年8月にデビューしたGrok-2は、アップグレードされたパフォーマンスと画像生成機能を導入し、機能をさらに拡大しました。
  • grok-2 mini
  • :2024年8月にリリースされたこの小型バージョンは、速度のバランスをとることを目的としています。 grok-3
  • :2025年2月18日に発表された最新のイテレーションは、複雑な推論と高レベルの問題解決能力を強調しています。このバージョンは、AIテクノロジーでは大きな前進と見なされており、既存のチャットボットをパフォーマンスで上回ることを目的としています。
  • さて、Grok 3はここにあります!!!
  • ここで完全なカバレッジを読んでください:Grok 3はこちらです!そして、それができることはあなたの心を吹き飛ばすでしょう!
  • grok-2とは?

    Grok-2は、Elon MuskのXaiが開発したGrokチャットボットの拡張バージョンです。それは、よりユーザーフレンドリーで、適応性があり、質問に答えること、執筆の支援、コーディングの課題への取り組みに習熟するように設計されています。

    重要な機能と機能:

    • アクセシビリティGROK-2はX(以前のTwitter)プレミアム購読者が利用できます。
    • パフォーマンス
    • Xaiは、Grok-2が前任者であるGrok-1.5よりも「顕著な進歩」であり、パフォーマンスと推論がアップグレードされていると主張しています。 GROK-2の更新されたバージョンは、精度、命令フォロー、多言語機能が向上し、3倍高速であると伝えられています。 ランキング
    • grok-2は、識別子「sus-column-r」の下でLMSYSリーダーボードの3番目のポジションを保持し、人類、ジェミニ、ラマ3からのクロード3.5を上回ります。
    • 画像生成 GROK-2には、画像作成能力があります。
    • リアルタイムデータ GROK-2は、x投稿から調達されたリアルタイムデータを使用します。
    • grokボタン「grokボタン」は、ユーザーが関連するコンテキストを発見し、リアルタイムのイベントを理解し、トレンドディスカッションをより深く掘り下げるのに役立ちます。
    • バージョン
    • Xaiは、応答の速度と品質のバランスをとるGROK-2 Miniと呼ばれるより小さく、より速いバージョンを起動しました。 Elon Muskによると、Grok-2は今後数日でオープンソースになります。
    • Grokのイメージ生成についての真実一般的な誤解の1つは、Grok 2が画像を生成するということですが、そうではありません。代わりに、XaiはFluxと呼ばれる別の画像モデルに依存しています。 フラックスは、特に現実的な出力に関しては、中journeyを上回っている場合、最も高度なAI画像生成モデルの1つです。
  • ユーザーがXで画像を要求すると、GROKは仲介者として機能し、APIを介してフラックスを呼び出して画像を生成します。

だから、Grokが直接画像を作成しているように見えるかもしれませんが、実際に舞台裏で流動を活用しています。

GROK 3のリリース:これがすべてを変える理由

Grok 3がここにあるため、Grok APIでAIエージェントの構築を開始するのに最適な時期です。世界で最高のAIモデルかもしれません。

注:1つまたは2つでは、APIを介してGrok 3にアクセスできます。
  • なぜGrok 3がそれほど重要なのですか?
    • 前例のないコンピューティングパワー:xaiは世界最大のAIクラスターを持っていますが、まだ拡大しています。
    • 第一原理的思考:マスクと彼のチームは、基本的な最初の観点からAIにアプローチし、最大の効率とパフォーマンスを確保します。
    • Advanced Reasoning
    • :Grok 3は、革新的なロジックで複雑な問題を解決し、既存のモデルを上回ることに優れています。 deepsearch
    • :特定のソースに焦点を当てるオプションを使用して、迅速で詳細な検索を有効にします。
    • 大きな脳:思慮深い分析のためにより多くの時間を割り当てることにより、応答の深さを強化します。
    • 責任あるai:X.aiの最初のチェーンモデル、透明性とバイアスと誤報に対する保護を確保します。
    • speed&power:コロッサスのスーパーコンピューターで実行されます。Grok2の3倍速く、リアルタイムアプリケーションに最適です。
    • Voice&Audio :今後の機能には、音声モードとテキストからテキストへの変換が含まれます。
    • ほとんどの人はまだChatGptまたはClaudeを使用しています。つまり、Grokはまだレーダーの下にあります。しかし、Grok 3が今後数日で優れていることが証明されている場合、それは人気が急速に急増し、1年か2年以内に世界をリードするLLMになる可能性があります。 APIを介してGROKモデルにアクセスする方法?
    • 今のところ、2つのモデルにアクセスできます:
    grok-2-1212:

    ろ過されていない洞察と生の知性を提供するフラッグシップLLM。

    grok-2-vision-1212:

    ドキュメントや写真などの多様な視覚入力の処理に優れている最新の画像理解LLM。

      最初に、open:https://x.ai/
    • 「今すぐ構築を開始」をクリックし、メールIDを使用してサインインします。
    • 必要に応じて支払い方法と請求先住所を追加します

    これにより、使用するモデルのAPIキーが設定されます。 Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」

    ハンズオングロック2モデル

    Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」

    .envファイルにAPIキーを保存:grok_api_key =“ your_api_key”

    Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」output

    Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」

    grok 2出力のコスト

    入力コスト(プロンプトトークン)

    import os
    from openai import OpenAI
    From dotenv import load_dotenv
    load_dotenv()
    GROK_API_KEY=os.getenv(“GROK_API_KEY”)
    client = OpenAI(
    api_key= GROK_API_KEY,
    base_url="https://api.x.ai/v1",
    )
    completion = client.chat.completions.create(
    model="grok-2-latest",
    messages=[
    {"role": "system", "content": "You are a Python progamminmg language expert."},
    {"role": "user", "content": "How can a beginner read and parse a JSON file in Python? You can teach them using examples"},
    ],
    )
    print(completion.choices[0].message.content)
    • 40トークン×($ 2.00 / 1,000,000)
      = $ 0.00008
    出力のコスト(完了トークン)

      713トークン×($ 10.00 / 1,000,000)
    • = $ 0.00713
    • このリクエストの総費用

    したがって、このリクエストは約0.00721ドル(または約0.72セント)です。 画像の理解:ビジョンモデル

    import os
    from openai import OpenAI
    From dotenv import load_dotenv
    load_dotenv()
    GROK_API_KEY=os.getenv(“GROK_API_KEY”)
    client = OpenAI(
    api_key= GROK_API_KEY,
    base_url="https://api.x.ai/v1",
    )
    completion = client.chat.completions.create(
    model="grok-2-latest",
    messages=[
    {"role": "system", "content": "You are a Python progamminmg language expert."},
    {"role": "user", "content": "How can a beginner read and parse a JSON file in Python? You can teach them using examples"},
    ],
    )
    print(completion.choices[0].message.content)

    Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」入力画像

    To help a beginner read and parse a JSON file in Python, let's go through the
     process step-by-step with examples. We'll use the `json` module, which is
     part of Python's standard library, making it easy to work with JSON data.
    
    Here's how you can read and parse a JSON file:
    
    1. First, we need to import the `json` module.
    
    2. Then, we'll open the JSON file and use `json.load()` to parse its contents.
    
    3. Finally, we can access and use the parsed data.
    
    Let's see this in action with an example:
    
    ```python
    
    # Import the json module
    
    import json
    
    # Open and read the JSON file
    
    with open('example.json', 'r') as file:
    
    # Parse the JSON data
    
    data = json.load(file)
    
    # Now we can work with the data
    
    print(data)
    
    # Accessing specific elements (assuming the JSON structure)
    
    print(data['name'])
    
    print(data['age'])
    
    # If it's a list of objects
    
    for item in data:
    
    print(f"Name: {item['name']}, Age: {item['age']}")
    
    ```
    
    Let's break down what's happening:
    
    1. We import the `json` module, which provides functions to work with JSON
     data.
    
    2. We use a `with` statement to open the file. This ensures the file is
     properly closed after we're done with it.
    
    3. We use `json.load(file)` to read and parse the JSON data from the file.
     This function automatically converts the JSON data into a Python object
    
     (usually a dictionary or a list).
    
    4. After parsing, `data` now contains the JSON content as a Python object. We
     can print it or access its elements.
    
    5. Depending on the structure of your JSON, you can access elements using
     dictionary syntax (`data['key']`) or list indexing.
    
    Here's an example of what the `example.json` file might look like:
    
    ```json
    
    {
    
    "name": "John Doe",
    
    "age": 30,
    
    "city": "New York"
    
    }
    
    ```
    
    Or, if it's a list of objects:
    
    ```json
    
    [
    
    {"name": "John Doe", "age": 30},
    
    {"name": "Jane Smith", "age": 25}
    
    ]
    
    ```
    
    For beginners, here are some important points to remember:
    
    - JSON files typically have a `.json` extension.
    
    - JSON data can be a single object (like a dictionary) or an array (like a
     list).
    
    - You need to know the structure of your JSON to access its elements
     correctly.
    
    - If you encounter errors, it's often because the JSON file is not properly
     formatted or you're trying to access elements that don't exist.
    
    To practice, beginners can create their own JSON files and try parsing them.
     They can also use online JSON validators to ensure their files are correctly
     formatted before attempting to parse them in Python.

    output

    Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」

    if completion.usage:
    print(completion.usage.to_json())
    {<br>"completion_tokens": 713,<br>"prompt_tokens": 40,<br>"total_tokens": 753,<br>"prompt_tokens_details": {<br>"audio_tokens": 0,<br>"cached_tokens": 0,<br>"text_tokens": 40,<br>"image_tokens": 0<br>}<br>}
    import os
    from openai import OpenAI
    from getpass import getpass
    XAI_KEY = getpass('Enter Grok API Key: ')
    grok 2出力のコスト

    Hands On Grok 2モデル:「Grok 2がオープンソースになるだろう」

    入力コスト(プロンプトトークン)

    テキストの入力コスト:

    52トークン×($ 2.00 / 1,000,000)= $ 0.000104
      • 画像入力コスト:
      768トークン×($ 2.00 / 1,000,000)= $ 0.001536
      • 総投入コスト= $ 0.00164
    • 出力のコスト(完了トークン)

    テキスト出力コスト:

    483トークン×($ 10.00 / 1,000,000)= $ 0.00483
      • このリクエストの総費用
      したがって、このリクエストは約0.00647ドル(または約0.65セント)です。 Langchainを使用した
    grok 2

    output

    チャットボットを作成してみましょう

    os.environ['XAI_API_KEY'] = XAI_KEY
    image_url = (
    "https://safarisafricana.com/wp-content/uploads/2020/05/Copy-of-SAFAF-2X1-images-60.jpg"
    )
    client = OpenAI(
    api_key=XAI_KEY,
    base_url="https://api.x.ai/v1",
    )
    messages = [
    {
    "role": "user",
    "content": [
    {
    "type": "image_url",
    "image_url": {
    "url": image_url,
    "detail": "high",
    },
    },
    {
    "type": "text",
    "text": """Please provide a detailed description of the contents in this image, including any notable objects, colors, patterns, and the overall scene.
    If there are any texts or symbols, please transcribe or interpret them as well.""",
    },
    ],
    },
    ]
    completion = client.chat.completions.create(
    model="grok-2-vision-latest",
    messages=messages,
    temperature=0.01,
    )
    print(completion.choices[0].message.content)
    output

    The image depicts a vibrant and lush savanna scene, showcasing a variety of<br> wildlife in their natural habitat. Here is a detailed description:<br><br>### Animals:<br><br>1. **Giraffes**: There are three giraffes in the image, standing tall with<br> their long necks and distinctive spotted patterns. Their colors are<br> primarily light brown with orange-brown patches. They are positioned towards<br> the center and right side of the image.<br><br>2. **Zebras**: Several zebras are present, identifiable by their black and <br>white striped patterns. They are scattered across the scene, with some<br> standing and others grazing. Their stripes create a striking contrast <br>against the green grass.<br><br>3. **Antelopes/Deer**: There are multiple antelopes or deer-like animals,<br> with slender bodies and light brown coats. Some have white underbellies and<br> legs. They are smaller in size compared to the giraffes and zebras, and are<br> seen grazing or standing around.<br><br>### Vegetation:<br><br>- **Grass**: The ground is covered with lush green grass, indicating a<br> healthy and vibrant ecosystem.<br><br>- **Bushes and Trees**: There are various green bushes and small trees<br> scattered throughout the scene. In the background, there are larger trees,<br> including one with a broad canopy on the left side of the image.<br><br>### Colors:<br><br>- **Green**: Dominant color due to the grass, bushes, and trees.<br><br>- **Brown**: Seen in the giraffes' patches, antelopes' coats, and some parts<br> of the zebras.<br><br>- **Black and White**: The zebras' stripes.<br><br>- **Orange**: Subtle tones in the giraffes' patches.<br><br>### Patterns:<br><br>- **Giraffe Spots**: Irregular, orange-brown patches on a light brown<br> background.<br><br>- **Zebra Stripes**: Bold, black and white stripes with varying thickness.<br><br>- **Antelope/Deer**: Light brown with white underbellies and legs.<br><br>### Overall Scene:<br><br>The scene is set in a savanna or grassland environment, typical of African<br> landscapes. The animals are coexisting peacefully, suggesting a harmonious<br> ecosystem. The lighting suggests it might be daytime, with natural sunlight<br> illuminating the scene, enhancing the vividness of the colors.<br><br>### Texts or Symbols:<br><br>There are no visible texts or symbols in the image.<br><br>This image captures the essence of wildlife in a natural setting,<br> highlighting the diversity and beauty of the animals and their environment.
    結論

    Grok 3の発売が近づいているため、XaiはOpenai、Google Deepmind、および人類の深刻な挑戦者としての地位を急速に位置づけています。 Xaiの大規模なコンピューティングパワーが優れたAIモデルに変換された場合、Grokは今後数年間でAIスペースを支配する可能性があります。開発者、起業家、およびAI愛好家にとっては、今ではGrokで構築を開始する時です。アーリーアダプターは、これまでで最大のAI革命になる可能性のある大きな利点を得るために立っています。

    if completion.usage:
    print(completion.usage.to_json())

    地球上で最も賢いAIであるXai Grok 3の力を体験してください!私たちのコースに登録して、画期的な機能を探求し、今日のプロジェクトを変革してください!

    {<br>"completion_tokens": 483,<br>"prompt_tokens": 820,<br>"total_tokens": 1303,<br>"prompt_tokens_details": {<br>"audio_tokens": 0,<br>"cached_tokens": 0,<br>"text_tokens": 52,<br>"image_tokens": 768<br>}<br>}
    Grok 2の実践的な情報に関するこの記事を見つけていただければ幸いです。以下のコメントセクションでご意見をお聞かせください。

以上がHands On Grok 2モデル:「Grok 2がオープンソースになるだろう」の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。